Earlier quoted context omitted.
A huge component of compulsory (either by statute or de-facto as a result of adjacent statute, like mandatory insurance + requirements thereof) professional licensure is that if you follow the rules set by (some entity deputized by) government the government will in return never leave you holding the bag. The government gains partial control and the people under it's control get partial protection. "oh I'm sorry your…
Right, but usually that also involves verifying that the electrician actually followed the professional rules, and if not, they have liability
Sounds to me like following orders is in fact this magical thing that causes courts to direct liability away from the defendant.