For those that don't realize it, building codes and permits were originally implemented for structures built for use by governments to be certain that contractors were doing things right.
Over time these started being applied to people and their property due to public ignorance.
This is a very common method for people calling themselves government to implement control and has happened again and again (drivers licenses being the most obvious case).