This is a patently ridiculous take. People are still DIYing the very things you are concerned about, just not knowing whether what they did was up to code or not. Just look up DIY on YouTube and see.
Not to mention, they also cannot spot when their contractors are blatantly cutting corners.
Having access to the code won't change that. As laypeople it is too complex for them to understand. Often they simply ignore the code if they personally believe the code is unnecessary. It takes years of experience to understand why you should follow instructions you'd rather not. That's part of why the apprentice period is so long.
I have never seen a YouTube video where anyone even mentioned the code unless they were a professional or engineer. Most people are not very smart. Making the code free isn't going to make them smarter. I'm the one guy on subreddits telling people not to modify random beams in their house unless they know how it ties into the rest of the structure to determine the structural impact. 99% of people reply that I'm over-reacting. That's how they act towards the code. Slap it real hard and if it seems solid it's good to go.