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.
To me continental or othe few reasons been mention here above shouldn't be the reason why renting a home is more preferable than building a house, normally once a man income becomes stable , home comfort should be highly consider, we shouldn't see building a house as what is more beneficial for our children to inherit, in my country here building a house for rentage is a good and lucrative business because taxes and so on do not much apply. Though it is more beneficial to houses that are located in the urban areas.
I understand your take from the perspective of homeownership, but that changes quite a bit with location and specifics. For example, in 2024, most family in major cities in Indonesia consider that it is cheaper to rent than to buy a house with mortgages. That is why this trend is fueled through high-rising prices of homes and the increased rates of mortgages, which keep buying a home beyond the reach of an average fellow even if he pays high rents.
That said, buying a house is not all about financial gains. As you said, besides being a source of comfort in having a place called home, in several countries it is a very lucrative business to build homes for letting. Particular being a landlord in a city offers good opportunities to earn regular income from tenants. Yet, it is important to take into consideration all those aspects of maintenance costs, taxes, long-term investment that come into play when weighing up the advantages of being a house owner against renting. Each has a plus and negative side to it, depending on what your priorities are and what the market conditions are.