Yes, they had gods, but those laws were not written with reference to their gods. What society are you speaking of, that is +5000yo?
They had a moral underpinning. They feared bad behavior would bring disfavor from the gods. Legal stricture and morality are not one in the same.
What society are you speaking of, that is +5000yo?
It starts with Abraham. I'm not talking about a political structure here.