I strongly disagree with the way you paint this - especially the irrational “the math is against you”.
if given someone who unjudiciously spends money, then I agree that paying off a house is a fantastic way to save (versus fancy car, excessive holidays). But this is a psychological battle, and has relatively little to do with finance.
Critically, many people have very little diversification and instead they only have two financial instruments: their job and their home. Investing money in a third instrument (equivalant to retirement savings?) instead of paying off principal should make sense if expected returns are similar to mortgage rates.
For those that have the skill and strength to invest carefully, the equation simplifies down to comparing your mortgage rate versus your expected investment returns. If investment returns exceed interest costs, then not paying principal and instead investing, is the prudent thing to do. There are other life circumstances that affect expected returns e.g. age and capacity to deal with market volatility.
The cliché that you should pay off mortgage principal before anything else is mindless, and may come from the past when interest rates were higher?