There is more than enough land for everyone, and rich people aren't really competing for the kind of housing that poor people are competing for, e.g. smaller plots with smaller homes. The demand of the rich does not eliminate demand of the poor, so the market produces different kinds of housing for different clientele.
Think about it this way: assume you supply all the housing to all the rich people. Then there still remains untapped demand of others that can be fulfilled by further production of homes for those specific people.
This story fails when land becomes restricted, which is exactly what zoning laws cause. Zoning is a big harm to the poor.
> rich people aren't really competing for the kind of housing that poor people are competing for, e.g. smaller plots with smaller homes.
This disregards basic geometry. Sure, in some rare situations you only have one small plot of land surrounded by existing construction or natural boundaries. But, in the majority of cases, you have one large plot of land, and you can either construct one big house on it, 5 smaller houses, 10 small houses, or 200 apartments in a block. The rich are absolutely competing for this lot with the poor.
And as inequality goes up, the rich can even start contemplating buying up surrounding properties, tearing down construction, and transforming a small plot into a much larger one.
Given the choice between being homeless and living in favelas, millions in Brazil have chosen to live in favelas.
The reality of zoning laws in Western countries is to provide a target for regulatory capture by the NIMBY crowd. With the result that we're systemically underbuilding housing, then wonder why we wound up with homelessness.
Favelas are a local optimum which systemically is very difficult to get out of and is a sign that the regulator is powerless. It's a great example of a market failure.
Think about it this way: assume you supply all the housing to all the rich people. Then there still remains untapped demand of others that can be fulfilled by further production of homes for those specific people.
This story fails when land becomes restricted, which is exactly what zoning laws cause. Zoning is a big harm to the poor.