So in I recently learned that when Socrates was put on trial and killed, he was 70 years old. However I also know that during the middle ages the average age of death was a measly 35. So why did the age of death shrink so much over just a few thousand years. It is even crazier when you realize that Socrates may have lived longer had he not been put to death, and just died of natural causes. What caused this rapid decline in lifespan?
The figures (estimates) you cite are of life expectancy at birth. As such they include infant mortality but also the impact of epidemics, maternal mortality, war, famine, etc. A high level of infant mortality will reduce the average life expectancy at birth for a population, but if you don't die in childbirth and you survive childhood you're likely to significantly exceed the 'average age of death' you cite (i.e. life expectancy increases with age; make it to your early 20s and you've a decent shot at surviving until you're 70). As a generality, there was no significant change in the mortality rate from the Antique to the Medieval period.
Real declines in the mortality rate have taken place over the past 150 years or so. The reasons for this are complex and given the number of variables (dietary improvements, sanitation, vaccination, etc) still disputed. Check out the McKeown thesis and its critics if you're interested in this issue.
Because you're using the wrong math.
Average of something is calculated by taking n numbers, adding them up and dividing by n. It works best for these kinds of estimates when the distribution of those n numbers is fairly even. Problem is, you get very skewed results out of it. Let's say that we have 3 people, two of which earn 10 bucks a day, and one which earns 10 000. Average salary is therefore 5 010.
Now let's say that there are 100 people, 99 earn 10 and one earns 10 000. Average salary here is about 110 dollars, so you'd assume that your average person is fairly well off, while in reality, it's just that one guy and the rest are poor.
For numbers that have a big piling up on one side, taking median instead of average is more useful in many cases. Median basically works by sorting the n numbers from smallest to largest and starting to cross out one number from the front, and one from the back, with the one that remains being the result. In our previous example, the median would be 10.
If you start taking the median of life expectancy, you arrive to the 50-60 range in the middle ages, 70 was still considered very old. This is also affected by the exact period, numbers during the black death will look very bad indeed, and wars can skew these numbers even further.
Today, we eliminated most of the factors that cause these big deviations from the average - for example, it's been a long while since last proper epidemic, and infant mortality is way down. Another factor is that there's just more of us, and the more data samples you have, the more stable these results are. One outiler in a group of 10 can skew your results a lot, one in a group of 1 million, not so much.
You're comparing the age of one person in one era to an average in another era. There have always been individuals who died at very young or very advanced ages, and there still are. If you want to compare ancient Athens to medieval Europe you'd need to compare averages, not one individual versus an average.