The process of natural selection deals with passing down those traits that allowed the successful species to survive and propagate. This included not only a means of obtaining food, but also some means of self protection. In many prey animals this may be simply camouflage enabling them to blend into their surroundings such as chameleons or rabbits (white fur in winter) ... In some this self protection was provided by an actual means of defense such as the tusks on the elephant. An elephants tusks are there to allow him to physically fend off predators. They are weapons. So, although elephants are herbivores, their tusks are not for the purpose of grinding up plants.