Lifestyle, environment, health care, etc all impact life expectancy
Life Expectancy until the 20th Century was hugely impacted by infant mortality. With that greatly reduced has come a large jump.
But then it was always a little misleading because if you survived your childhood you had a decent chance of living a pretty long life for centuries.
Even 200 years ago if you got past the deadly first few years you usually could expect to live to 60 or so.
Depending of course on war, plagues, or falling victim to what were rather ridiculously called Doctors back then....
Of course now we have social things going on like whining about calling someone morbidly obese just that because its fat shaming. That probably is having a negative effect on the numbers.