You may have done it right...
"May have"?
Piddelwhumper!
.... but in many many cases criminal negligence in building practices takes years and even changes in ownership to discover.
I favor building codes & inspections.
But they've gotten out of hand, eg, $2800
for engineering of a small shed addition that
is extraordinarily likely to pose any risk
to anyone or anything.
A contractor I know says that 25% of the cost
of every remodeling job he does is for permits
& inspections. You can argue that it's worth the
cost, but there's also the issue of ballooning
housing prices that make people homeless.
Not a good balance of competing interests IMO.
The reason the system has evolved is that people are negligent, ignorant and even criminal and there needs to be a way to check that behavior. If you're going to swear at anything, swear at human nature.
You should grok by now that I rage against
the unreasonable, not the reasonable....or do
you advocate hideously expensive unnecessary
government dictates?