The main reason is simply that president of the US is the very top position that can be achieved for a (US) politician, and exactly like in most careers one is most likely to reach the top at the end of their career.
A serious candidate needs a lot of experience, a strong network, access to funding, and a solid public image. These things rarely appear overnight and most politicians spend their life patiently building their profile and their network. Given the competition for what is arguably the most powerful job in the world, an old candidate is statistically more likely to have reached the stage where they have a fighting chance than a young one. The same trend is visible in most countries with few exceptions.