That's completely backwards.
In order to determine whether you can afford to retire, you need to be looking at recurring expenses, not illiquid assets. If you have an expected monthly income from your 401k of, say, $1200, but your mortgage payment is $800/month, it doesn't matter that you've got $150k already paid into it and only another 10 years left to go; you can't afford to retire now![0]
Yes, it's theoretically possible (depending on how much equity you actually have, and your credit score) to take out a home equity loan to provide you with money to live on in your retirement, but a) there's interest payments to think of, which put you right back at the top of this post looking at monthly expenses, and b) if this is a significant part of your net worth (which, for many of these people, it absolutely will be), this means that at best you're leaving your heirs with a bunch of debt and no house, and at worst the bank just won't let you do it in the first place. And while there is certainly a perfectly reasonable discussion to be had of whether it's better to use the money for yourself now, and not care about your family, making that selfish choice is far from universal.
[0] No actual numbers were harmed in the making of this post. All numbers are entirely made up.