I would do a small comparison, in the USA you can buy a gun with 18, drive with 16 and drink a beer with 21.
Such codification is for the purpose of regulation/enforcement. In real world, such codes does not make us moral or responsbile. Because they do not control our sub-conscious mind. And law can not be effected for just having negavtive emotions, it has to translate into actions for the law to take its course of action. So law is not proactive it is reactive in that sense.
That is why u can not stop gun violence through law. That will continue to happen.