Why Were Laws Created?

Laws were created to give everyone a fair shake. That way not matter if you were rich or poor, royalty or a surf everyone was subject to following the same rules. It was a promotion of equality.