The code is a model standard for electrical installation which has been adopted in almost all areas of the US and some foreign countries. Each jurisdiction is free to make local provisions that override or add to the NEC. This is rare. From the National Electrical Code:
90.1 Purpose.
(A) Practical Safeguarding. The purpose of this Code is the
practical safeguarding of persons and property from hazards
arising from the use of electricity. This Code is not intended as a
design specification or an instruction manual for untrained
persons.
(B) Adequacy. This Code contains provisions that are considered
necessary for safety. Compliance therewith and proper
maintenance result in an installation that is essentially free
from hazard but not necessarily efficient, convenient, or
adequate for good service or future expansion of electrical use.
(C) Relation to Other International Standards. The requirements
in this Code address the fundamental principles of
protection for safety contained in Section 131 of International
Electrotechnical Commission Standard 60364-1, Electrical Installations
of Buildings.
Informational Note: IEC 60364-1, Section 131, contains fundamental
principles of protection for safety that encompass protection
against electric shock, protection against thermal effects,
protection against overcurrent, protection against fault currents,
and protection against overvoltage. All of these potential
hazards are addressed by the requirements in this Code.
90.2 Scope.
(A) Covered. This Code covers the installation and removal of
electrical conductors, equipment, and raceways; signaling and
communications conductors, equipment, and raceways; and
optical fiber cables and raceways