Usually driving without a license or buying minors alcohol is dangerous and can cause damage. Now you can say "well, making sure your kids cant get your guns is a way to limit damage" but it also can cause damage if a person needed to get the gun in a hurry. Lots of deaths happen when an intruder is already in the bedroom. A cop will give you a ticket/arrest you if they see you doing said crimes, as most of these crimes happen in public. An officer will not see your gun on your nightstand in your own house. If you tote guns around the house anyway; its a good reason to teach your kids about gun safety, even if you don't own a gun. If your child shot up a school then possibly, maybe, somewhere down the line, you failed as a parent.
you can make the same argument of "breaking the law may be safer" for driving without a license - maybe everyone else is incapacitated at the bar and you forgot your license at home. honestly, go the ahead then, its safer for everyone even if technically illegal. but its unlikely the chances of experiencing a home invasion is higher than your kid taking your weapon, and even if it was, you simply invest in quick-open locks or only unlock your gun at night and keep it next to you before you go to sleep, and lock it up while you're away from home and not carrying it.
you're using a lot of "what if" scenarios that dont really apply - anyone whos really concerned with a home invasion can still comply with a lock-up law, or choose not to if they arent at any risk of kids taking their weapon. like an adult buying alcohol, if you not locking up your weapon doesnt significantly increase the possibility of a kid taking your weapon (ie, you dont have any kids in your house) then theres absolutely no problem and the law would not affect you.