Guided by our president and U.S. senators, the public tends to equate the correctness of a Supreme Court opinion with whether it approves of the outcome. That is not the rule of law; it is naked, results-oriented politics.

Although not unique in this endeavor, President Barack Obama facilitated this public perception when he criticized the U.S. Supreme Court's Citizens United v. Federal Election Commission decision during a State of the Union address.

President Obama never mentioned the legal reasoning behind the court's decision that limited money spent on supporting candidates prior to an election with documentaries, pamphlets and other media materials. He noted only the outcome he found unfavorable but not the First Amendment interests or precedent, which led many others to believe the court's decision was obviously wrong.

Both parties do this, and it has eroded public confidence in the court and caused confusion about the role of the court.

When politicians and the media galvanize the public on either side based on outcomes, not fairly applied judicial reasoning, it reduces the legitimacy of the highest court in the land and is corrosive to the rule of law in the United States.

Even before sexual assault allegations surfaced against Justice Brett Kavanaugh, public participation in his confirmation process undermined the role of the judiciary.

Now, many believe that the Senate has confirmed a justice who committed multiple sexual assaults, and even more believe he at least lied under oath about trivial matters. These are reasonable grounds for questioning the legitimacy of the judiciary. Ultimately, however, diminishing the scope of the court’s role will harm all of us.

If Justice Kavanaugh’s jurisprudence is independent and methodologically sound, he will have fulfilled his duties as a justice.

But there are many — pundits, scholars, politicians and media — who are trying to delegitimize the Supreme Court because they believe it will no longer render decisions in line with their political preferences. Undermining the role of the court because some won’t like the results it reaches is precisely the sort of politicizing that fractures the public and compromises the court’s independence.

All of us, as a nation, should consider how we can sacrifice some of our preferences in order to reaffirm the judiciary’s role in protecting the constitution, even if decisions are perceived by the majority as wrong.

Here’s what we can do to restore legitimacy to the judiciary. Start paying more attention to the reasoning behind the court's processes and call out those who assess judges solely based on results. Argue for a firmer commitment to consensus building and adherence to precedent. The more judges believe they must be bound by the rule of law, the more they will bind themselves. Don't view the court as useful only when its opinions lead primarily to results you like.

You won’t like every decision of the court, even in important cases, but that’s how it should be.

Indeed, the point of judicial protection of the constitution is to override public will when it goes against our longstanding constitutional rights. If most of the public does not like the result in Citizens United, it might be an indication the court did its job as independent arbiters of the constitution.

Of course, sometimes judges render decisions that are influenced by their political views, and sometimes judges’ methodologies consistently produce results that accord with their political preferences. This is why the court has swung from being perceived as liberal to being perceived as conservative. But the court is and must be so much more than this.

The judiciary, interpreting the constitution, has protected our privacy rights against unreasonable searches, prevented police officers from torturing confessions out of people and prohibited the state from executing juveniles. The First Amendment, as interpreted by the Supreme Court, distinguishes us even from many western countries where Google is forced to remove search results and speech can be censored if sufficiently offensive to certain groups.

Everyone has a role to play in relegitimizing the judiciary. But we, the people, need to be more fair-minded to get past our personal beliefs to see the legal reasoning behind court decisions.

And we also must remember that it is a court that upholds an oath to protect and defend the constitution of the United States of America. It is not a court of public opinion.

Erica Goldberg is an assistant professor of law at the University of Dayton. She was a clerk in the U.S. Court of Appeals for the Sixth Circuit.