Alex Tabarrok gives us two reasons

Housing is overrated as a financial investment. First, it's not good to have a significant share of your wealth locked into a single asset. Diversification is better and it's easier to diversify with stocks. Second, unless you are renting the basement, houses don't pay dividends. Stocks do. You can hope that your house will accumulate in value but don't count on it. Indeed, you should expect that as an investment your house will appreciate less than does the stock market.

...Another problem with houses is that home ownership locks people to location making it harder to move for jobs. The problem is especially severe because no one likes to sell at a "loss" even when it is rational to do so. So when jobs disappear and home prices fall instead of moving, people hold on for too long just hoping that things will get better.

I would add two more reasons.

People who own seem to spend a LOT of time on their weekends and holidays doing repairs and maintenance. If this is something you enjoy, great. If you would rather spend time with family, read, work, or Netflix binge, then it's not so fantastic. Personally, my marginal value of leisure is high.

Alex highlights some of the benefits of housing. Some people like them a lot (or have been socialized to), and there are tax breaks. Plus so much of life in America is structured around home buying, such as public schooling.

I would add "forced savings". If you are the kind of person who does not invest first spend later, then your mortgage forces you onto an intensive savings plan (in an albeit suboptimal investment).

So, basically, the best argument for houses is "distortions and weakness".

I suspect some readers will still say things like "but housing is historically a great investment!". I'm not sure they are thinking in real terms, and I do not think they are comparing it to historical stock market returns. And I am guessing people selectively remember the houses that appreciated, not the ones that stayed mainly flat. It's like making the case for stocks based on people who bought Apple in 1987.

Surely someone has done the numbers here. Any pointers?