Classical liberals and libertarians, especially those who admire the works of the famous legal theorists and economist F. A. Hayek, are fond of pointing out that a free society requires the rule of law. Others, critical of this political tradition, note, however, that laws rule most societies, many of them quite tyrannical, so the rule of law has no bearing on a society's being free.
What might be the source of the close relationship alleged between free societies and the rule of law is that the only laws that can be applied uniformly and universally in society are the very few that aim to keep us free. Other so-called laws are really just edicts from rulers, not bona fide laws, since they apply selectively, not equally to us all.
This goes back, in part, to natural law theory, which is itself related to the role of laws in the natural world. Laws regulate everything of a certain kind, not just some such things. The laws of motion apply to all things movable; the laws of photosynthesis to all things that can undergo that organic chemical process. And so on and so forth.
The difference is that with natural laws as applied to human beings, laws do not automatically apply but serve as guidelines to choose successful actions and institutions. That is because we humans possess free will and can attempt to circumvent the laws that we ought to follow so as to succeed, live right as human beings. But otherwise these are still laws, only moral, ethical or political laws, not biological, chemical or physiological ones.
Apart from this aspect of laws that guide human conduct, namely, that they regulate voluntary action, such laws, too, need to be universal, applicable to all humans. Only those qualify as bona fide laws that apply universally, to all humans, not just to some based on certain peculiarities of the law maker(s) or those intended to be ruled by the edict(s).
But there are very few laws that really apply to us all – they are the ones mainly concerned with protecting our basic rights. The rule of law is then evident where very few such laws are upheld, where government is, therefore, limited to upholding them. That is what connects the rule of law so closely with the free society.
For example, no one ought to murder, rob, kidnap, or assault another person. These are universal principles of human conduct. They are, to use Kant's terminology, categorically true for guiding human interaction, any time, anywhere. However, that seatbelts ought to be worn is not universally true – there can be plenty of circumstances in which that is false. Or again that 40% of one's earnings ought to be paid to the legal authorities – that, too, lacks universality by a long shot, if it is ever true at all.
So, when such edicts are made into laws, despite the appearance that's based on pomp and circumstance – being "signed into law," "entered into law books," etc. – they fail to amount to bona fide laws. They are bogus laws and will be widely resisted by those who realize this, know that the edicts do not apply to them. These edicts will, thus, violate the principle of the rule of law.
As a result of the proliferation of pseudo laws, all bona fide laws, those that really ought to be obeyed by everyone, tend to lose their credibility. When the legal order treats drug or alcohol prohibition, or affirmative action mandates, along lines it treats the prohibition against murder and rape – when it equivocates between these two categories of edicts by calling both of them laws – it is natural for people to begin to see them both as merely conventional, just something those in power happen to wish to prohibit or mandate, not as something that ought to be obeyed.
One virtue of the classical liberal, libertarian idea of law is that it preserves the coherent, even reverent meaning of the concept "law" and does not water it down, thereby weakening its reputation and undermining its binding force.