You don't need a license to work on your own things. You need a license to work on "other people's " things.
Do you have to go to a barber, or can you cut your own hair and shave yourself.

. If you get a minor cut, do you put a band-aid on it or go to the doctor

? Both of those occupations require years of training to get a license.
I'll change any of my electrical bits or plumbing on my house I feel I can. No way I'd do it for someone else. Inspections here are mostly a money grab and a way to increase our taxes. No one is going to have an inspection to see how a receptacle has been replaced or a light changed out.
Where are you located? Do they have hardware stores that sell electrical receptacles and lights to the general public?