Many things wrong with society can be explained by misunderstandings of the nature and purpose of law. Many see it as nothing more than rules handed down from above and think all that matters is the quality and intent of the ruler. In debates about democracy, such thinking is revealed in the common assumption that laws are or will be good if the rulers are elected. Nothing in history seems to support this view. Hitler's election did not validate the Final Solution. An elected Congress did not validate the Jim Crow laws. A majority view in favour of eugenics, promoted vigorously by the Left at the time, did not justify the bad laws made on the subject in various countries.
I favour democracy as a way of choosing lawmakers, administrators of state assets and services and even of police chiefs and judges. In this I am keener on democracy than most Europeans, but I don't believe it is magical. A bad law cannot be made a good law by democracy any more than Victor Yanukovich, Vladimir Putin, Adolf Hitler or John Prescott were made good men by being elected. A crook is a crook, regardless of votes. And a crock is a crock.
In legal philosophy there is a concept of Natural Law. Regardless of the nature and intent of the lawmaker, it holds that a law is only good if it aligns with natural justice. Religious people traditionally looked at law this way on the basis that God determines what that is, but it's open to others too. The obvious problem, if you're not religious, is how to determine what natural justice is. It might surprise readers to know that I think equality is at the heart of it. A law that favours one man over another, without distinction based upon his own personal misconduct, is almost certainly wrong in nature. How would I define misconduct? The initiation of force or fraud.
The draftsmen of arguably the best, possibly the most effective and certainly the most influential legal document in modern history proceeded on the assumption that certain truths were self-evident and that laws were only "good" (both in the lawyer's sense of valid and in everyone else's sense of moral) if they were consistent with those truths. They sought to address the practical problem of aligning laws with natural justice by limiting the legislature's scope, fragmenting power to make it harder to make sweeping changes, setting up an independent court to rule on the validity of laws and allowing the population to arm themselves to the teeth so that - if all else failed - they could more readily water the tree of liberty with the blood of tyrants and patriots.
The cynic will object that all this is pie in the sky. Political power grows out of the barrel of a gun and, once gained, the power to make and impose rules follows. International law may say the Crimea is Ukrainian. The superior violence of one state over another says it is Russian and the same truths apply at national level. God or Nature may give our government no right to seize our earnings, confiscate our wealth on our death or tell us how much salt is used in making our salted snacks. But the state's monopoly of violence says otherwise and we should be grateful that, unlike in lesser lands, we can choose others (or offer ourselves) to wield the sword of that violence in ways that please us better.
There's the rub. Natural justice does not enforce itself. Public international law is mostly nonsense because the only bailiffs are soldiers under the command of more or less wicked states and the outcomes of enforcement actions (aka wars) are determined by the quantity of weapons and troops and the military prowess of the commanders. For practical purposes it is a crock. At best it's a moral framework for when it's right to fight a war, international, civil or revolutionary. The national equivalent of that may simply be that natural law is a moral framework to determine when it's right to disobey. Nothing in it will protect you from the consequences of disobedience - especially if the makers of bad law have successfully disarmed you.