The older I get the more I realize that you can't regulate the things wealthy societies do into existence. If everyone can't afford building code things collapse when you mandate that. If the economy is underpinned by bad working conditions or child labor things collapse when you regulate them. If people can't afford to eat at restaurants that follow some new code then they simply won't and those restaurants will fold. If you restrict the supply of some trade through licensing in the name of quality then you just get amateurs doing the lower dollar work for cash. A society has to be able to afford to do the things it mandates. People have to get wealthy enough to reliably afford "right" before you can legislate away "wrong".
People don't want poor people to live near them. That is the root of most of the zoning issues, it's not because they are actually worried about the quality of the housing stock that the people would live in.
I'm guessing sorisos is spot on with their last sentence. There's a big difference between being a millionaire surrounded by middle classers and being a lower classer surrounded by extreme poverty. Often times with happiness research there are caveats and ranges to keep in mind but the nuances tend to get lost in the headlines.
No, mostly people don't want poor people or sub-optimal housing in their neighborhoods, for a variety of financial, perceived safety, and emotional comfort related reasons.
If it was just not wanting poor people to live in suboptimal housing, there'd be a lot greater effort to provide non-sub-optimal housing to poor people. There are definitely people with this concern, but it's not the driver of housing and zoning policy.
Beautiful, cheap, easy, fast, durable (fire- and earthquake-proof, "It will not rot, rust or decompose in water.", etc.) and regular folk can make them with "backyard-scale" foamers and construction technique.
Some people would rather pay for private security than for policy that makes muggings less likely, I suppose.
.... yesn't???
I take it you've never heard of the NYPD or LAPD? "But they're not private security." Boy, I guess you got me there.