I agree with what you’re saying, but that’s overly simplistic.
Infrastructure costs increase as you increase density. Charging an appropriate fee for new housing rather than limiting the growth is an efficient solution, but current methods allow for local corruption.
That’s just one of the hidden reasons for our current system. Another, is most people want to live as far as possible from poor people.