what is the purpose (intended effect) of the rule of law

That all people in a country be obedient to laws, not subject to the whims of a monarch or dictator.