Homeownership has been glorified because, over the past few decades at least, it's been an unbeatable investment.
There is no need to pay off a mortgage before retirement. You can sell up (likely for a huge profit) and use the proceeds to buy a smaller property, rent, or retire to somewhere with significantly lower living costs.