Btw this a fallacy/bad accounting that many home owners fall into.
Most say $550K sale price minus $400K purchase price == $150K profit.
But you need to remove: Taxes, maintenance, cost of your time (if you value that at all), realtors fees, HOA, bank fees/insurance, home insurance, depreciation on purchases you only had because of home ownership (tools, lawn mower etc).
Once you remove those it's hard for home ownership to make financial sense relative to investing in the stock market + renting.
However, and this is discussed in another thread, homeownership is a lifestyle choice, and we should be ok with making financially suboptimal choices for the sake of a quality life. We just need to keep clear it's an expense for a purpose, not an investment for financial gain. If we overspend on house liability it's no different than overspending on cars or food or travel.