Law is a basic principal of nature and enables a sytem to function that is in line with human nature.It is assosiated with religion heavilly and many people see it as an exercise in right and wrong, good and evil.This is not so, evil is not against the law,as good is not against the law, (although either could brake the law).In genesis it says that we are on a path of both good and evil to attain knowledge.Sin is equated to law, by many and therefore the root of law is at original sin. This would be the point that indicates that we have boken the law and thereafter punished, until we pay the debt.All other law breaking and sin follows from this.This is the common view.But it is not the case.The religion does not see it as breaking the law and punishment.It sees it as path of knowledge, ( good and evil).
So law is not a case of right and wrong, good and evil as people seem to assume.Mostly nowadays it is a set of rules that enable the system to operate.The system also breaks the laws of nature,and human nature.
The comandments are the basis for human law,and are in line with societies rules.They are the rules to attain knowledge for evolution as well.
As said earlier we have had our self defence gene removed. Our killing gene, so we are susceptable to problems that nature throws at us.We are supposed to deal with our problems by obeying the rules, and basic comandments.