Land use and building code regulations increase the cost of building housing. That's not to say all such regulations are bad, but it should be acknowledged more than it is. I think Philadelphia just passed a regulation requiring all new residential construction to have fire sprinklers. Is that a good regulation? I really don't know. But it does add quite a bit to the cost of construction, and therefore it adds quite a bit to the cost of housing.
The other thing that adds to the cost of building, especially in areas with high land prices, is, of course, minimum parking requirements.