Land is also necessary on which to build said shelter, but vacant lots in rural areas can be had quite cheaply. Lots of places where an acre, which is more than plenty to build shelter on, won't fetch much of anything dollar wise. That is, where regulation allows you to actually buy a small lot in a rural area from the surrounding landowner. Regulation often makes doing that very difficult.
The problem, at least not in a huge country like the USA, isn't population. There is incredible amounts of unused space ripe for housing someone. The problem is being able to build shelters for those people without getting caught up in red tape.
Hardly anyone wants to live in rural areas where land is cheap because there are no good jobs or services nearby. In desirable areas, land acquisition costs are far higher than construction costs. Regulation has little to do with it, although in some areas zoning laws that limit density are a factor.
Desirable areas are expensive because regulation has allowed some people to make vast fortunes, allowing them to spend almost limitlessly on living in those desirable area.
Tech is the prime example of that. Without regulation like that which surrounds intellectual property, software would be quite literally worthless.