That’s why it is often not just a math question, but a life plan question if it’s a major part of your estate. Major/minor, married/single, relative rates, AA, sources of income, etc, etc. A married couple with no heirs, & 2 pensions and high SS, and investments, any of which easily cover the mortgage or easy principal payoff, look at it totally different than the single FIRE female with heirs, where all income is based on investments for a long time, and the paid off home is part of the FIRE plan for minimum expenses.
My original FI consideration included a paid off home because I looked at it as part of a lifetime checklist of things to do before retirement, since pretty much everyone I knew that was retired did that. It was only the last 5 years or so that I wondered what the point of that was, when I wondered this same question & why such a large amount of after tax funds were tied up there, limiting flexibility. I mean, there are always taxes, insurance, utilities, and maintenance costs associated with a house, and with autopay and a lot of fixed income, that easily exceeds all those cost, a mortgage is just another bill automatically taken care off. Plenty of lifetime renters FIRE.
Then it occured to me that all the retired relatives I knew were relatively uneducated financially with limited fixed incomes, though with various levels of savings. Many had paid off the house early in their careers, because that set the stage for LBYM. Once the house was paid off, that monthly amount was available to save, invest, pay for college, afford any important cost. For the financially risk adverse, it was a safe place (usually) to keep money safe and inflation protected.
I remember future in-laws back in the ‘80s, that still lived in their $8000 house bought in 1953. They had a mortgage burning party when it was paid off in 1973/4. I thought it was a big deal, until her dad explained to me the party was a joke; the P&I were like $65/mo. Taxes and insurance were way more than that. I asked him if it was that low, why did he wait so long to pay it off. “Why bother? The rate was so low, money in a savings account makes way more.” My first financial lesson of any merit. (They lived in that house until they both passd away, the MIL in 2012. The house was by far the largest part of the estate. No one does that anymore!!)