Morals were invented to hold a larger group of humans together. Smaller groups can be held together by everyone knowing each other, larger groups required a more complex system of trust.
Morals are the glue for nation states. Morals prevent us from driving over others, morals prevent us from being mean to others. Moral makes us trust the politicians we vote for because we are told they have the same morals as we.
My somewhat cynical picture of morals is only to make a point of how deep morals go in our societies. Folks have conscience and morals are the basis of that conscience - be it good or evil.
Police and armies enforce these morals in the form of laws and legal constructs. Important to note though that morals are not filly encoded as laws, these are two concepts are separate societal adhesives.