Usually because those responsible for regulating housing are heavily invested in it, and like the fact that high immigration is pushing prices up. In the case of more blatantly malicious governments, it can also be used to encourage divisionism, or to weaken the power of the working class. At best, its just because building housing (esspecially in more extreme climates) is slow and expensive. As usual, most things lead back to corrupt governments and capitalism.