The laws of God, his commandments, are the righteous code of freedom, the rules that define and preserve both political freedom and its taproot, spiritual freedom. God’s laws are not merely the suppression of fallen human impulse. They are the honor code of liberation. They are the way authentically free persons conduct their business with Him and with one another: Now that you are free, here is how you ought to live.
God Himself declared as much to the ancient Israelites when, before He gave them His law, He reminded them that He was the very One who brought them out of slavery and bondage in Egypt (Exodus 20: 2). Now that they were a free people, here’s the way a free people ought to act; here’s the way they ought to conduct their affairs. If they were to be, and to remain, both morally and politically free, they must not lie (Exod. 20: 16); they must find ways of gaining rest for themselves and others (vv. 8-11); they must respect their elders, thereby acknowledging the debt they have to their ancestors and those who made the world they inherited (v. 12); they must respect and preserve private property (v. 15); they must respect human life and refrain from all murder (v. 13); they must not serve any false gods, for there is one God and one God only (vv. 2-7); and they must keep themselves free from envy, lust and inordinate desires, which themselves are bondage and indicate moral slavery (v. 17).
In other words, the freedom God gave them came with responsibilities, and these laws articulate the responsibilities. Freedom, to be preserved, comes with obligations. These laws are the preservatives and the obligations.
Freedom, furthermore, must be extended to others, and these laws are how to extend it to those who are foreigners and who live among you. As God never tired to remind the Israelites, they too were foreigners in other lands, and they knew first hand how bitter and crushing that experience could be (Exod. 22: 21, 23:9; Deut 5:5, 10: 19). Imposing that crushing bitterness on others is not the way freed and righteous persons ought to live.
And if the ancient Jews found this freedom and its obligations beyond their reach, as the unregenerate always do, then the law would do something else for them: It would lead them to The Great Liberator Himself (Gal. 3: 24), Who would set them free in soul, a liberation from which all other freedoms spring, and which helps to keep freed persons on the right side of the line that divides liberty from licentiousness.