Biggest of them all: interest. On a $1M mortgage, you’ll almost pay $2M as interest over 30 years even at 7%.
Historically interest was never as low as during the pandemic. And most people bought houses using mortgages. The average “cost” of owning a house is much more than the selling price, even before you account for the upkeep.
The mortgage interest is one of the few costs that people (sometimes) account for. Usually with a hand-waving "my mortgage payment is lower or about the same as my rent payment" - which ignores that a rent payment covers everything whereas the mortgage payment only covers principal, interest (and sometimes insurance and property tax, if escrowed).
In many places, this can be substracted from taxes, effectively slashing 35-40% of the cost where I live. So does almost all renovation costs (not upgrades though, just repairs).
Also, where I live 7% wasn't the case in past 20 years, and even now its rather 1.5% + whatever bank puts on.