Here's how the codes prevent you from building a $20,000 house:
-In the county where we live now (not where our homestead is, thank God), the building permit for a new house runs $10,000
-Utility connection fees -sewer, water, electricity -have a blanket fee of $10,000, plus inspection fees.
So, you are out $20,000 before you ever break ground. Then there are these gems:
-All plumbing, electrical, and septic work has to be done by a licensed contractor, even if you know what you are doing.
-Owner-builders have to get all plans stamped by a professional engineer.
-Owner-builders have to have 4x as many inspections (at hundreds of $ each) as contractors.
The code is just as restrictive for existing homes. We had to replace some drywall in our bathroom last year; we were legally supposed to get a $200 permit and get our plans approved. The law applies to any home repair more extensive than replacing a sink trap.
And God forbid your home gets declared historic. An older friend of mine is having to sell the home she's lived in since the 70s. Why? It just got declared historic, so it's now under the jurisdiction of both the planning board and the historical preservation committee. She is supposed to restore the home to its "original looks," which means tearing down the porch that's been there since the 50s, replacing the fence with something "period appropriate," getting rid of the shed she built 20 years ago, and replacing some windows. The work required is extensive enough that it would count as a remodel which would, you guessed it, mean she'd have to bring the whole 100+ year old house up to modern building codes. The cost of these renovations would be tens of thousands of dollars. She would have to take out a loan on a place that's been paid off for 15 years and she's about to retire. The committee has the legal power to force her to do this.
So, she's selling. She's being forced to sell the house where her children were raised, where her partner died, where she planned to live until her death, by a bunch of code enforcement officials who want to make things look better.