What is the Purpose of Rules and Laws?

If there were no rules or laws, people would have no boundaries to be civilized. Some people would still be kind, but others would create chaos.