They don't, it is illegal on the federal level to use age as a factor when determining eligibility for most loans (including mortgages) in the US. Check the "must not discourage you from applying or reject your application [...] based on these factors" section of this page[0] on the FTC website.
That concern about age is just how the parent comment imagines it works, without checking how it actually is first.
0. https://consumer.ftc.gov/articles/mortgage-discrimination
A bank would be delighted for a mortgage holder to die, causing the property to be sold and the loan to be repaid, if prevailing interest rates had risen since the loan was created.
It's very sad that OP has been under the impression that age has anything to do with a loan term.