Prices are set through a combination of supply-demand and cost of providing housing. Almost all increase in housing costs are coming from land price increase, due to land shortage from planning policies that limit land use density.
Housing has been made into an investment first, and a home second, by creating housing austerity and shortage. The only way to prevent housing from being an investment is to stop the artificial shortage of housing.