
Photo Source
The safety of the occupants of homes, buildings, and structures is the primary reason for having construction codes. These codes are addressed in permits, which allow cities to regulate construction and ensure that it is done correctly and safely.
Different cities adopt different codes; among them: the Uniform Building code, the Mechanical and Plumbing code, and National Electrical codes. In addition, there are federal, state and local laws that govern construction, such as those covering energy conservation.