Sex ed helps stop pregnancy and STDs because it teaches how to prevent pregnancy and STDs which is an outcome that you don't always want (pregnancy sometimes being what you do want). Drug education teaches you about the dangers of drugs so you at least know what kind of mess you're putting into your body and that mixing alcohol and drugs = high likely of serious OD and/or death. DUI classes are about punishment - they're not really for education, just a way for someone to make a buck from those who get caught and have to sit through one as part of their punishment.
When I was growing up we had little mini cartoons and PSAs on what to do if you encountered a firearm because accidental shootings were the main issue when it came to kids and firearms. That's not our problem with kids and guns today. Our problem today is we have far too many kids and adults who believe that firearms and violence in general is the way to solve problems. Educating people on how to store, operate, and carry firearms won't help us a bit with that problem. It will only help reduce accidental deaths but we're not dealing with accidental deaths. These are very intentional deaths.
Nothing wrong with a safety class but it's going to do what it was designed to do - keep you from accidentally shooting yourself. It's not going to really help with the fact that we have too many people that think shooting other people is the answer to any frustration they encounter.