We don't really have shanty towns in the states. We definitely don't have a Kowloon Walled City, which is an example of what can happen when no regulations are involved (and somewhat remarkably not burn down and kind of thrive even if still a slum).
Hong Kong is super dense and super expensive, Shanghai is similar, but at Mainland Chinese prices. I'm all for density, but anyone who thinks that density alone solves affordability issues simply hasn't travel enough.
Tent cities != shanty towns. Shanty towns are like semi-permanent buildings, tents are just...tents you buy at REI and then set up at the park with your stuff. We had one nearby my house at the Seattle Ballard commons that lasted during COVID (and is gone now). I wouldn't have called it a shanty town like I saw in the Philippines.
Maybe it's OK if some housing is less perfect and closer to ashanty town. I'd rather live in a shanty town than a cardboard box under the freeway. If nobody wants to live in the "shanty town" nobody will move in and no investor will want to build another one. I sometimes think that the provocative way of putting all this is that we need more slum lords. They filled a need.
https://en.wikipedia.org/wiki/Kowloon_Walled_City