I tend to think that the answer must vary greatly from one area to another.
When I was closing on the purchase of my current house, the former homeowners had an electrician friend upgrade the panel as an agreed part of the sale. We are on cellular meters, and the PCO apparently knew immediately that the meter had been pulled. The building inspector posted the house a day later, pulling the occupancy permit until the building permit and inspection was done. They were required to add the ground rods and GFCI for the kitchen and bath circuits, so I got in scot-free. (We were not yet under the code cycle that required AFCI.) The sellers were quite unhappy as the cost of the upgrade increased dramatically from their original agreement with their electrician friend.
I've added additional circuits and plumbing since then, all with permits and inspections done. The inspectors have been nothing but pleasant to work with, but they will call you on your mistakes. The required AFCI breakers cost more than all of the cable, boxes, receptacles, etc. combined. They failed my last rough-in inspection because I had not sealed all the holes with fireblock sealant. My mistake- no problem.
I tend to think a good DIY job is often done better than many hired out jobs. A homeowner has to look at their mistakes every day and because of this will often choose to take the time to do a really good job. Granted, not every person has the ability to learn and follow through with such work. On the other hand, I've seen plenty of hack jobs by people who called themselves professional tradesmen. It's unfortunate that good workers too often fail under the pressures that come with the bottom line of profit and loss.