Why does the Lord give us the 10 commandments?

Why does the Lord give us the 10 commandments?