Take the US as an example. The average house in N. America appreciates 5 to 6 per cent per year, which sounds great at first glance. In 10 years the value of your house will almost double.
But most people don't take into account the interest rate where the average homeowner is paying approx. 6% annual interest on a typical 30-year fixed mortgage.
So the interest alone is wiping out the gains on your annual 6% appreciation. On top of that you are paying 1% property tax year every year, maintenance and repair costs, etc.
Making matters worse is that for the first ten years or so most or all of your payments are applied to the interest, so you wont have any actual ownership or equity of the home,
or very little...for the first ten years. And consider that much of the appreciation of your house is simply due to inflation. So if inflation is 5% per year then that alone is undermining your actual appreciation.
In my opinion, buying a house is not a good investment for several reasons.
1. Poor Investment Returns
I agree with your explanation above, as in addition to that, you need to spare monthly/annual fee to maintain the good condition of your house.
2. Renting is Cheaper
If you don't have any stable job or you just set your life out of your parents house, buying a house is a big liability. Besides the fact tat it is a poor investment return, you also need to pay for your daily necessities since, for people who don't have a stable job, it will be a big problem.
3. Expensive Asset
We all know this, house is not cheap at all, and if you buy a house by installments or bank loan, it will make things worse.
4. Unproductive Asset
All thos three points above will lead us to this point that we could conclude that a house is indeed an unproductive asset, in fact it could be liability. So don't force ourselves to buy a house before we understand what we are gonna get and get ready for it.