Perhaps housing was always an investment vehicle. St. Petersburg is full of 4-5 storey buildings, initially with apartments for rent, most of whose were built to provide {Surname} with a stable income in the old age.
So if you are going to have private ownership of housing, the question is more about how policies should be structured. Should policy favor home ownership, should policy focus on housing affordability, etc.
People complaining about treating housing as an investment vehicle are often referring to policy choices in the US that treat home ownership as a good result in itself, regardless of the impact on affordability. So we have things like long term mortgages backed by quasi-government entities or local policy choices that focus on maintaining real estate prices (vs things like quality, availability and affordability).