I mean, I'll be honest and share that I didn't know the housing regulations are so f-ed up in the US, but they are pretty complicated everywhere.
What drives housing prices is a deflation of living goods coupled with an inflation of luxury goods which makes finding safe investments for large sums of money with relatively high yields hard to find. This is driven by an increasing inequality gap, which makes rich people desperately trying to find more things to invest their money into. And they have found housing in urban areas is the safest bet right now. So houses are bought and sold for the millions in hopes somebody else buys it for higher prices or the area justifies the rent.