I've long since suspected that a small part of the housing crises in the developed world is due to the high minimum standards for apartments and housing.
The parent is right. Shanty towns are the extreme low-regulation end of housing and they're also extremely cheap. It's a matter of how bad we want to allow people to treat themselves and our standards for safety and comfort keep going up so cost does too.