Buying a home or owning a home brings more than what you said about paying taxes etc. We save funds that we spend on renting houses, and we save on food that we will buy from restaurants or hotels because in our home we will be buying in bulk, and cooking food at home for 5 people is much cheaper than in hotels or restaurants. There are many other things to consider besides just cooking and eating.
The point is houses are definitely not a good investment financially but inheriting to kids is a big investment.
There are houses in my place that gave 10 over the 10 years so yeah financially houses are not good investments. They won't be a good investment and there is a study that shows that renting a place is much cheaper than owning a house.