What's particularly annoying about a situation like that is that the homeowner often has a lot more incentive to do a good job than a so-called "trained and licensed" professional does.
A moderately competent and motivated homeowner will often do a much better job than an "skilled expert" who rushes to get the work done.
I’m sure there are, but in all the places I’m aware of homeowners only need a licensed professional for certain things that are typically not DIY anyway.
Not OP but I live in Washington state. I recently added an outlet to my closet for a vacuum cleaner charger. I watched some instructional videos and did some reading and felt I could do it safely. Technically I’m “allowed” to do this but I needed to have gotten a permit and then gotten my work inspected, at significant time and money cost to myself.
Did it anyway for the cost of the $10 outlet and an hour of time. If my house burns down because of my work and my insurance finds out they could deny me the claim. I’d be out of a lot of money.
You go to sell the house and the buyer demands to see all your permits? The city inspector barges into your house uninvited?
Unless you're in a total buyer's market, you just sell to someone who isn't so nitpicky. Or you get a pro to inspect your work and attest that it's up to code (it would be, wouldn't it?)