Lack of activity is a huge part of it, perhaps bigger than diet.
Hi VO2max in elderly correlates better with longevity than non-smoking status or even crazy things like a cancer diagnosis. The latter point might seem farfetched but remember that among elderly men, it is very common to have managed prostate cancer that is rarely cause of death.