Aging is the inevitable loss of homeostasis in an organism that ultimately leads to its death, and in the broadest sense you can view aging as the result of a factor called extrinsic mortality. This factor is a way of saying that even if an organism was biologically immortal (no set lifespan), you would still only expect it to live a finite amount of time based on the threats in its environment. The world is a dangerous place – creatures eat each other, are infected by pathogens, freeze or starve to death, etc. There is always a certain risk based on your ecological niche and immediate surroundings, which should eventually catch up with you, statistically speaking. Driving on the Interstate falls under that category.
So even a biologically immortal creature has a set lifespan determined by its environment, and once there is a set lifespan you have a point beyond which evolution is no longer selecting for traits. Evolution only has to make each species good enough to grow and reproduce within the period of time that it can be statistically expected to live – thanks to extrinsic mortality. Traits promoting a longer lifespan than the statistical limit cannot be selected for. This cutoff on selective pressure also means that even if you started with a planet populated entirely by biologically immortal creatures, biologically-set lifespans would eventually evolve because traits promoting survival and reproduction in the short term would be selected for, whereas traits promoting long term survival would not.
This cutoff is also the origin of the three main biological factors contributing to aging: (1) antagonistic pleiotropy, which is the existence of genes that are beneficial in early life and detrimental in later life, (2) developmental inertia, which is where the same processes that guide development begin to simply drift in an unregulated manner after a certain age, and (3) the accumulation of irreversible macromolecular damage, which occurs because our bodies have no selective pressure to repair any type of damage that accumulates slowly enough to only be life-threatening late in life. So set lifespans evolve, not because dying by a certain age has any evolutionary advantage, but because traits that would let us live longer cannot be selected for.
When you stop and think about it, extrinsic mortality explains the specific biological lifespans of different species. Compare the extrinsic mortality of a giant redwood to a C. elegans, or that of an alligator to a fish. Our lifespan is probably the result of the environmental dangers during the time when Homo sapiens evolved – the Pleistocene. Also this means that if an organism’s environment becomes safer, then it should gradually evolve a longer lifespan to match the new conditions, since longer lifespans always have the evolutionary advantage of providing more opportunities for reproduction.
Here are a few predictions based on this theory: (1) Animals in stable environments will have a longer natural lifespans than animals in unstable environments (subject to droughts, flash-flooding, etc.), and (2) animals with few natural predators will have natural lifespans that are longer than animals that are subject to much predation.