Even with hedging of risks and liabilities involved in shoddy construction, even with information brokers in place to help people make informed decisions, even assuming ample construction of houses across the spectrum for all kinds of buyers, it definitely seems like without some kind of guiding hand that failure to consider long-term risks will lead to a lot of deaths.
What's worse is that a lot of the codes are in place to protect neighbors as well. Electrical wiring codes, for instance, are there to prevent fires. The hypothetical You might say that this turns into insurance and liability, but accurately judging the long-term risk and correlative damages sounds exactly like a government imposing regulations.
Building codes are, in fact, the market response to earlier problems with lots of houses burning and falling down. The fact that later generations who grew up with houses not burning or falling down don't have the insight to know this is not evidence that they're right.
And they always make the argument that it would be good for the poor, and it's always bullshit. The poor don't benefit from dying periodically because some jerk made a quicker buck than he otherwise would have.
You get shanty towns when people are too poor to afford anything else. People don't live in a shithole just for kicks, they do it because they have no choice. We shouldn't pretend this tradeoff doesn't exist.
You can build a surprisingly nice house for 1,000$ worth of materials, but there is no incentive when you build in the middle of a shanty town.
Of course, that $1000 house costs a full year of wages from a person earning $3-4/day and spending almost all of it on essentials. And this ignores the fact that many shantytowns occur in areas where property rights are weakly enforced - build a nice house, and 20 people will show up claiming they own it. Even if you have the money, you might instead be spending it on your children's education or something of that nature.
Shantytowns are a result of poverty and nonexistent property rights. Building codes, even if they were enforced, would not magically enable shantytown dwellers to afford something better.
Social disorder feeds off it's self, when you live in a shanty town and are likely to be robbed it is much more reasonably to spend an extra 5$ on alcohol and get to enjoy it vs invest it in stuff that you might not keep for vary long, do that once a week for 5 years and your talking about 1,300$. Some of the hidden advantages of building codes are allowing people to build nicer houses without standing out from their community.
The hidden advantage of building codes you describe only applies when everyone can afford that $1000 house.
That doesn't mean that the codes shouldn't be updated / refactored once in a while, but that's a pretty difficult thing to undertake, and there may not be political will...
Rip all of it out.
The scary thing is that the basement lights are still on the old wiring - roughly 1920's vintage. Fortunately, no gaslights left, although I do have one fitting in the upstairs sitting room!
turns out, most of the time that's actually too much for everyone else to fathom, frankly.