Most of the time those are determined locally, not at the state or national level. Usually by a city council and zoning board heavily informed by its wealthiest citizens.
People like to make this argument as a blind for, "I am tired of building buildings with expensive seismic retrofitting and anti-fire measures, or to even consider they have modern electrical infrastructure." I don't like those arguments very much, as they place an unfair burden on buyers and often represent burdens on already wealthy people, who tent to project far more burdens than they shoulder.
But if we're talking about "the homeowners around us are using the government to enforce scarcity because they love being ghoulish landlords rather than productive members of society" they yeah, I'm on board with you.
Both of these fit through the keyhole of "building regulation" so I'm trying to draw lines to show you where I stand.
I am less opposed to requirements about what must be in a structure for safety of yourself and surroundings. I am very opposed to preventing building whatsoever, or artificial limits to density. People think when they buy a house they have the right to ensure everything around them changes as little as possible. I disagree - you have the right to your own land not changing, but you should not be able to stop your neighbor.
I have heard people complain that building a house is N times more difficult today than 20 years ago, and as someone who wishes to build a house in the future, these complaints worry me. Perhaps there is no need for worry over second hand mutterings, though. I will see what the situation is like when I actually start building.
It seems that usually the legal burden of compliance and regulation forms an efficient service sector that is able to meet it– but in a sort of roundabout way I question the very need for this compliance sector. Thank God for fire safety and non-toxic building materials, but some law is absurd, and represents a process for process' sake when you look at its effect.
I'm not certain this is a problem outside of the Bay area.