So someone else put up the capital, the government made that capital cheap, and societal demand with artificial scarcity (in most places) pushed up the asset value.
I’m not saying it’s a bad thing, but let’s not pretend that making capital gains on a house in the US is anything like any other available investment.
Yes, mortgages are subsidized by our interest tax deduction system. That part is true. It doesn't turn home ownership into something with no risk, and it certainly doesn't turn it into this subsidized investment. It's a liability, not an investment.