Governmental authorities regulate electrical work for several reasons: first, because of the public interest in the electricity industry as a public utility; and second, because of the inherent danger of electricity that may put the public in danger if electrical work can be undertaken by just anyone.
There are several ways that states regulate electrical work. First of all, government has traditionally regulated power producers not only to prevent monopolies but also to prevent arbitrary pricing on electricity costs. And even when the industry has been deregulated in the 90s, state authorities have made it a point to keep the competition level open to the market to prevent these same problems, while at the same time maintaining a high level of quality and efficiency among the players.
Secondly, states regulate electrical work by requiring practicing electricians to obtain a license to be able to offer electrical services legally. This licensing requirement is conditioned upon electricians meeting necessary requirements, including rendering the required hours of formal training and apprenticeship under the guidance and supervision of a master electrician.
Lastly, electricians are governed by the National Electrical Code which provides for code standards for any and all types of electrical work. States may also adopt more stringent electrical codes to apply to their jurisdiction, and these would be considered as supplemental to the NEC. Either way, there are accepted industry standards for electrical installations and various other electrical work. The NEC is also updated often, at least once every three years, to ensure that the latest safety measures and most efficient electrical methods are adhered to by practicing electricians.