Because of the importance of electricity in society, the absence of which can paralyze a city or community for the duration in which there is a power outage, governments take an active hand in regulating the electrical industry, including the regulation of electrical contractor work.
For electrical contractor work specifically, the government’s interest is in risk reduction, whether it is to the people doing electrical work, or to the infrastructures or buildings to which electrical work is being undertaken. Electricity is inherently dangerous, and should not be handled by anyone who is not fully qualified to do so. So one of the ways by which government regulates electrical contractor work is by providing licensing rules and regulations to qualify electricians, and by providing that only licensed electricians can undertake electrical contractor work, or offer electrical contractor work to the public.
Be that as it may, many individuals do undertake DIY electrical projects inside their own homes. But qualified electricians take years to be able to qualify for a license, and those years of experience and formal training and education cannot be achieved overnight on a DIY project. No wonder most of the electrical shocks occurring in homes were the result of errors in DIY projects.
So government has also implemented another way to regulate electrical contractor work, which is the adoption of industry standards to which electrical work must conform. Improper or faulty wiring or electrical installations can cause electrical fires, which can, in turn, cause property damage and serious injuries to people, which may sometimes even be fatal. That is why most building regulations require that electrical installations be up to industry and code standards to be approved by local regulatory bodies.