Modern people like to see freedom as the complete absence of any constraints. But think of a fish. Because a fish absorbs oxygen from water, not air, it is free only if it is restricted to water. If a fish is ‘freed’ from the river and put out on the grass to explore, its freedom to move and soon even to live is destroyed. The fish is not more free, but less free, if it cannot honor the reality of its nature. The same is true with airplanes and birds. If they violate the laws of aerodynamics, they will crash into the ground. But if they follow them, they will ascend and soar. The same is true in many areas of life: Freedom is not so much the absence of restrictions as finding the right ones, those that fit with the realities of our own nature and those of the world.
So the commandments of God in the Bible are a means of liberation, because through them God calls us to be what he built us to be. (Tim Keller, Every Good Endeavor, p 39)