For electrical, how about this scenario; your house burns down, killing one of your family members. The investigators discover that faulty electrical wiring you installed was the cause. You get zero insurance money and possibly a manslaughter charge.
Oh right, but you'd do it perfectly so this wouldn't happen. Well have fun arguing that if the investigators find your wiring near the fire origin.
Wow, talk about spiking the old drama queen meter. As a licensed electrician for the last three decades, I have seen, repaired, and given expert witness testimony on many construction messes created by pros AND DIYers. Bottom line I that there is no shortage of clueless, and dangerous "professional electricians" and a surprising number of homeowners who can do outstanding work.
As for your claim of being denied insurance compensation, I guess it's possible, but I can assure you that it's rare, to nearly unheard of. The first assumption I would assign to the typically competent and thoughtful members here, is that they are not going to do anything stupid to cut a corner, or save a few pennies. Typically you are interacting with the kind of folks that research a topic to death, do a fine job of execution, then find a knowledgeable person to review their work. Second, an investigator at a fire scene is looking at a mess. They might be able to pinpoint the source of ignition to an outlet, but not be able to determine if it's a defective outlet, incorrect install, a defective cord end, a defective device plugged into the outlet, etc... As the inspector is working, they are also looking at the materials and installation methods of the remaining structure. If the finished basement is wired in lamp cord (yes I have seen that) and the ceiling is bed sheets stapled across the bottom of the floor joists, it is noted, and will be a part of the investigation. That said, unless the findings are that the work was grossly incompetent. illegal, and the cause of the fire, odds are that the insurance company is going to pay in full.
Finally, inspections are a complex situation in the US. They are useful for updating values and generating more tax revenue. If done by a competent professional, they can provide a base level of evaluation regarding life safety issues in a structure. (This is why, even though I despise the whole corrupt process, I believe that some form of inspection is a requirement. Proper stair design, railings, egress windows, basic electrical, plumbing, and structural standards etc.... are necessary) Codes have quickly become a multi-billion dollar scam that has spread to most of the country since 2006. They are used by manufacturers and industry organizations to push agendas. The fire sprinkler industry, and that giant manufacturer of extruded polystyrene are two good examples. They generate hundred of millions in revenue for engineering firms and others who have weaseled into rural and suburban locations and taken over enforcement and code administration. But most importantly, much like the home inspectors everybody relies onto help close a real estate deal, there is no shortage of incompetent, clueless or even corrupt inspectors in this game. The fact they you passed an inspection is pretty meaningless in my opinion.
My local township was running a really well done inspection protocol until recently. They did so at cost, and had many competent people in house, and in the field. They switched to an outside contractor. permit fees tripled, and the township got a cut of the fees. So they are thrilled. They cut their staffing costs a few hundred thousand a year, and they get to keep 10% of the grossly inflated new fees. Bottom line at the moment? Two inspectors in the field. One is a middle aged woman who smart, well educated, and knows the thousand page code book inside and out. The flip side is that she has very little idea of what she is reviewing in the real world, and compensates by being a prick about meaningless paperwork that other competent inspectors ignore. The other inspector, who was fired recently, was a burned out hippy who, at my first interaction, I ignore, since I assumed he was a wandering homeless guy. I nearly laid an egg when he asked to see the prints.
This situation is far from unique. Permits, fees and licensing are the new hidden tax and means of control in our society. Before running for governor, our current POS was an attorney general. He created a scam based on the fact that he needed to "protect" the public from contractor fraud. There are ample laws on the books for this, but he was running for governor and needed the press. He then collects $5,000,000 from 80K applicants and tells the public that "for now" they have to give everybody a license since they don't have a proper procedure in operation to vet applicants. The state government then sticks the cash in the general fund and does nothing except wait until the contractors send in their next pile of cash to keep their licenses in effect. Now, in order to come into your community to do work, I have to present my state license to the township, town and/or homeowner's association. If you think that you are on top of things you might even ask me to see it before I start work. Unfortunately, like much of the inspection regiment, it's all a fraud. I may be a great contractor who does a great job. I may be a total scammer who reopened my company in my son's name to avoid detection. You can even go to the state AG's website and look me up. You might even get warm fuzzies, since my info. is clean. Not only is my info. clean, so is everybody else's, since the whole thing is a fraud. And the game goes on..................