There's very good reasons to pay off the mortgage, it certainly is not "nearly always a bad idea." If you were given a house free and clear would you immediately take out a mortgage on the house? Once you pay off your current mortgage are you planning on immediately taking out a second one? We don't know a thing about this person's finances so we can't advise either way. The feeling of having no debt is amazing and that sort of emotional security can't just be discounted. Finances are just as much about emotion as they are about cold hard numbers. Of course, everyone is different. "But you can get a higher return in the market," you say. You can also lose money in the market, too. It's a great idea in a bull market but a terrible idea in a bear market. If you have a time machine you'd already be filthy rich. Many people think equities are overpriced right now and we are heading for a correction. "But mortgage interest is tax deductible," you say. Only if you itemize and not everyone itemizes and interest on a margin loan is tax deductible too.
Some people may not want to retire at all and if they did why should they wait 30 year, specifically, if they want to retire? The poster didn't give his or her age so he or she might already be retired or is approaching retirement age. They may be younger but with significant assets. A million dollar windfall is enough for me to retire on right now.