What is the purpose of the 10 Commandments?

Are they arbitrary rules?

D.A. Carson gives a helpful explanation in The God Who Is There: