Aging has evolved despite its terrible effects on the individual because over the long run it is highly effective in the evolutionary competition that takes place in most ecological niches - any amount of hardship and pain can be selected for if it means that genes are more effectively propagated. There are exceptions, however, in the form of successful species that do not appear to age; especially in the case of lower animals we can find life histories that look nothing like our own. Take the hydra, for example, or here the tiny jellyfish Turritopsis dohrnii:
[An individual Turritopsis dohrnii appears to reverse its life cycle], growing younger and younger until it reached its earliest stage of development, at which point it began its life cycle anew. ... We now know [that] the rejuvenation of Turritopsis dohrnii and some other members of the genus is caused by environmental stress or physical assault. We know that, during rejuvenation, it undergoes cellular transdifferentiation, an unusual process by which one type of cell is converted into another - a skin cell into a nerve cell, for instance.
But we still don't understand how it ages in reverse. There are several reasons for our ignorance, all of them maddeningly unsatisfying. There are, to begin with, very few specialists in the world committed to conducting the necessary experiments. ... The genus, it turns out, is extraordinarily difficult to culture in a laboratory. It requires close attention and an enormous amount of repetitive, tedious labor; even then, it is under only certain favorable conditions, most of which are still unknown to biologists, that a Turritopsis will produce offspring.