The law came as part of a passage. At the same time as he gave the law, God gave a system of priests and sacrifices to deal with sin. These sacrifices were a constant reminder to the people of their sin. As part of the package, God also gave some other external distinctives, like the Sabbath and circumcision, to separate them from the nations around them.
God no longer works through a nation, so the external distinctives are not long longer required. Our agape love should distinguish us from the people of the world. The perfect sacrifice of Jesus ended the need for the Old Testament sacrifices. Jesus became the great high priest, ending the need for priests.
However, a method of restraining wickedness is still needed. Everyone understands this. Even nations that reject God have laws against theft and violence. They might mess up God's law by adding human accretions, but they generally understand the need for laws against these crimes. Everyone understands that law is essential for a peaceful society.