The United States Supreme Court has two personalities. In the vast majority of cases on its docket, those involving criminal law, business regulation, statutory interpretation, freedom of speech, procedure, jurisdiction, and other technical but important legal questions, the Supreme Court acts like a court of law”a good one. The justices achieve a remarkable degree of consensus and craft opinions that are clear, persuasive, and well grounded in text, history, and precedent. This is true even in hard cases, where there are good arguments on both sides. No one will agree with every decision, but no fair-minded observer could doubt that decisions are based on conscientious legal reasoning.

Then there are the hot-button ideological cases. This term they centered on same-sex marriage, affirmative action, and voting rights enforcement. In these cases, the Court seems to lose its bearings. The justices split into predictable warring camps, liberals against conservatives, with Justice Anthony ­Kennedy’s vote usually determining the outcome. The opinions in these cases are often failures of legal craft. Passion”not law”tends to govern outcomes. Legal analysis is weak, sometimes embarrassingly so.

This does not mean the results in these hot-button cases are extreme. In fact, the overarching message of the 2012“13 term was the Court’s attempt, led by Kennedy and Chief Justice John Roberts, to hew a middle course in the highly controversial areas. In the same-sex marriage cases, the Court invalidated the federal Defense of Marriage Act but stopped well short of declaring a nationwide constitutional right of men to marry men and women to marry women. The Court tightened the screws on affirmative ­action admissions by colleges and universities, making it more difficult for these institutions to defend their race-based policies when they are challenged, but it did not outlaw such policies. And it invalidated the formula for determining which states are subject to preclearance requirements under the Voting Rights Act, but it did not question the legitimacy of this enforcement mechanism if it is properly targeted.

All these decisions avoided the extremes. For once, there were no end-of-term lamentations about the Court’s “radical turn to the right,” which has been a staple of Court “analysis” for thirty years.

The popular media treat the United States Supreme Court as a thoroughly political institution, polarized”like the rest of our political realm”between a right and a left that can no longer come together for the common good. An organized claque seeks to portray the Court (without much evidence) as stacked in favor of business and against consumers, workers, and ordinary Americans. These made-for-TV depictions have all the reality of a reality show.

For all the handwringing about ideological polarization, the Court decided a remarkable 49 percent of its seventy-eight cases in the 2012 term by unanimous vote”up from 44 percent the previous year and 33 percent in 2008. Don’t imagine it did so because these cases are easy. Almost all featured issues on which the lower courts had issued divergent judgments. In nine of the cases (thirteen if you count amicus filings), the administration, through the solicitor general, urged the opposite result. (The liberals on the Court are not lapdogs of the administration.) The chief justice’s detractors may not have noticed, but this pattern of increasing unanimity fulfills the pledge he made during his confirmation hearings to build greater consensus on the Court by deciding cases more narrowly and modestly than in the past. It helps that the Court decides relatively few cases, giving the justices time to think things through and work things out.

Twenty-three cases (29 percent of the total) in the 2012 term were decided by five to four votes, an uptick from the past two years. But in almost a third of these, the Court split along lines other than right“left. For example, it was not unusual to see Justice Antonin Scalia, the conservatives’ darling, aligned with liberal justices in criminal cases, a result of his commitment to interpretation based on history and of a soft libertarian streak in domestic matters. On the other side of the spectrum, liberal justices joined with the conservatives in two unanimous cases protecting property rights against governmental takings, in both instances reversing the lower courts.

Contrary to the caricature of the Court as a pro-business drone, the four most important business cases went opposite ways. Two favored business interests, one preempting tort suits against generic drug manufacturers, and the other making arbitration clauses enforceable in antitrust suits. Two others went the other way, one letting drug manufacturers be sued under antitrust laws when they had settled patent cases through cash payments to the alleged patent violator, the other preventing biotech companies from patenting human genes.

In two other cases, the Court continued its recent trend of refusing to expand the rights of employees to sue for alleged discrimination. This has been greeted in some circles as evidence of the Court’s bias. But readers can judge for themselves whether these rulings are unreasonable. In Vance v. Ball State University , the Court defined “supervisor,” the person whose discriminatory actions lead directly to liability for the employer, as a person who can fire, demote, or discipline the plaintiff. And in University of Texas Southwestern Medical Center v. Nassar , the Court held that an employee cannot challenge an allegedly retaliatory employment decision, such as a refusal to hire, without proving that retaliation was the cause of the decision and not merely one of several motivating factors.

Criminal law cases similarly went both ways. Criminal defendants won important victories in Alleyne v. United States , which overruled a prior decision allowing the imposition of certain sentences based on facts not found by a jury, and in Florida v. Jardines , prohibiting the use of drug-sniffing dogs at a homeowner’s door without probable cause. On the other hand, the Court gave prosecutors both the right to collect DNA samples from arrestees and run them against DNA databases and the right to comment at trial on a suspect’s silence before he is taken into custody.

Two cases touching on foreign affairs and national security warrant mention. For thirty years, the lower courts have interpreted the Alien Tort Statute, passed in 1789 for narrow purposes, as establishing a roving commission to adjudicate international law violations in other countries even if the crimes had no connection to the United States. Business interests opposed this development because they are frequently complicit in depredations by tyrannical foreign governments against their people, and it was a source of irritation to many of our allies. In Kiobel v. Royal Dutch Petroleum ,the Supreme Court unanimously put an end to this practice, holding that the Alien Tort Statute does not apply to actions taking place abroad with no connection to the United States. The Court divided on whether the act can ever apply to acts committed abroad, with a five-justice majority holding that it never can, and the concurring justices allowing some suits when American corporations are the perpetrators.

Clapper v. Amnesty International may have been the sleeper case of the term. A five-to-four majority, divided along strict liberal“conservative lines, held that the plaintiffs”human rights organizations, lawyers, journalists, and the like who maintained professional contacts with persons abroad who might be caught up in a terrorism investigation”did not have standing to challenge a 2008 law that allowed the government to intercept communications of foreign persons suspected of terrorist activity, with programmatic rather than individualized case-by-case review by the Foreign Intelligence Surveillance Court (FISA court). The plaintiffs feared that their communications with these foreign persons would be intercepted under the program. The Court held that the claim that these plaintiffs’ communications would be intercepted was too “speculative” to allow judicial intervention: No plaintiff could know for sure whether its calls were tapped, and the FISA court and other safeguards might well prevent any illegal invasion of privacy.

This reasoning was dubious. When in the past the Court has rejected claims for being “speculative,” there was serious doubt that the injuries had actually occurred. Here, there is no doubt that communications are intercepted. The only question is whether any specific plaintiff’s communications were among them. This historical fact is not speculative; it is just unknown to the plaintiff whether he is caught up in it. The government should not be able to evade constitutional review of its actions by not telling the targets that they were targets. The issue in this case should have been the substantive constitutionality of the program.

In the wake of recent revelations about the extent of government surveillance of Americans’ communications, Clapper has assumed greater significance than at first appeared. We now know that the surveillance programs are far more wide-ranging than most of us suspected. If they are unconstitutional, they should be stopped”and, frankly, we cannot count on the executive branch’s sense of self-restraint to ensure that constitutional limits are respected. But if the programs are constitutional”which, given known facts, is not unlikely”it would be good for the system for the courts to say so, after full consideration of the arguments. If the courts stay out of this, unconstitutional actions will proceed apace, and fully constitutional ones will remain under a pall of doubt.

Then there were the culture war cases. In these, the Court’s adherence to the rule of law seemed to evaporate. A five-to-four majority in United States v. Windsor held that section 3 of the Defense of Marriage Act (passed by Congress in 1996), which recognizes only traditional gendered marriage for purposes of federal law, is unconstitutional. This was the most egregious example this year of a decision based on something other than plausible legal analysis.

To be sure, the Court held back from declaring same-sex marriage a nationwide constitutional right. Kennedy’s majority opinion explicitly states that “this opinion and its holding are confined” to those couples “joined in same-sex marriages made lawful by the State.” But the legal reasoning of the opinion is a perplexing mishmash, despite its moderation.

To begin with, the opinion equivocates about the constitutional basis for the decision. The first seven pages of substantive analysis hint that the power to define marriage is constitutionally vested in the states. A holding based on this federalist ground would have invalidated DOMA while leaving the ultimate question of whether to recognize same-sex marriage up to the states”not a bad jurisprudential outcome. But after laboriously demonstrating that, in our system, the definition of marriage is traditionally a matter of state law, the opinion backs away from the legal conclusion, stating that it is “unnecessary to decide whether this federal intrusion on state power is a violation of the Constitution.” What, then, was the point of that lengthy excursus?

The opinion then cites three cases arising under the Equal Protection Clause of the Fourteenth Amendment, the challengers’ favored theory for unconstitutionality. The law, they argued, discriminates against same-sex couples for no good reason. The difficulty with this theory is that the law does not so much discriminate against same-sex couples as discriminate in favor of opposite-sex couples. Other duos (and trios, and more) are also denied the privileges of marriage. Consider two sisters bringing up their orphaned nephews and nieces, or best friends living as roommates.

Our special treatment of opposite-sex couples is based on the asymmetrical effects of procreation and childrearing on mothers and fathers. Same-sex couples cannot procreate, and even if they are bringing up children, which is not unusual, there is no biological or social asymmetry between them that forms the raison d’etre for marriage. The distinction is not invidious, and it certainly has at least a rational basis, even though the rationale has been weakened in recent decades by contraception, changing economic roles for women, and no-fault divorce.

In any event, whether DOMA, or any other refusal to recognize same-sex marriage, is consistent with equal protection depends on the standard of review. If the standard is rational basis, which requires those challenging the law to prove it has no rational purpose, DOMA clearly survives (more on that below). If the standard is heightened scrutiny, which requires that the defenders of the law actually prove that it serves a particularly important governmental purpose, the issue is more difficult. Whether strict or heightened scrutiny applies was the principal legal issue debated by the parties. The Court offered not a word.

Instead, the opinion stated that DOMA is unconstitutional as “a deprivation of the liberty of the person protected by the Fifth Amendment of the Constitution,” that it violates “basic due process” principles, and that it inflicts an “injury and indignity” of a kind that denies “an essential part of the liberty protected by the Fifth Amendment.” That sounds like substantive due process rather than equal protection. But the Court has repeatedly held that substantive due process protects only those rights that are “deeply rooted in this Nation’s history and tradition.” There is no suggestion that same-sex marriage, which is a very recent phenomenon, is so rooted. So what, exactly, is the textual basis for the Court’s holding?

In place of orthodox legal analysis, the Court attacked the motives of the legislators who enacted DOMA, asserting that they acted out of the “bare . . . ?desire to harm” homosexual persons. This claim of hateful motive was not a casual slip of Kennedy’s pen. It is his sole argument against the statute, and he reiterated it in multiple ways. DOMA had the purpose “to disparage and to injure” same-sex couples, to “demean” them, to “impose . . . a stigma” on them, to deny them “equal dignity,” to brand them as “unworthy,” and to “humiliat[e]” their children. These were, the Court declared, the actual purposes of enacting DOMA”not just unintended consequences of a law passed for other reasons.

There are three things wrong with this approach. First, it is not factually true. The Congress that passed DOMA in 1996 by a vote of 85“14 in the Senate and of 342“67 in the House of Representatives was not infested with hate-mongers. Whether one agrees with DOMA or not, the law served the entirely rational purpose of ensuring that there would be uniform treatment of same-sex ­marriage for federal purposes, an outcome based on what was then the unanimous consensus of all fifty states. Congress was merely preserving the status quo, and not “injuring” anyone. President Obama himself claimed to oppose same-sex marriage until recent months. He was not hateful then and benevolent now. He simply changed his mind on a difficult social question.

Second, the Court has repeatedly held that the constitutionality of statutes depends on their objective purpose and not on the subjective motivations of the legislators who vote for them. Yet the Court did not trouble to engage with the rationales offered by the supporters of DOMA either in the legislative history, the national debate, or the briefs. It simply dismissed contrary views as hateful. This is not constitutional analysis; it is adjudication by name-calling.

Third, judicial rhetoric of this sort does grave injury to the body politic. Fundamental to the equal respect necessary for a democratic republic is the ability to treat those with whom we disagree as acting in good faith. Disagreement is not the same thing as malice. Ordinarily we can count on the judiciary to model this respectful disagreement. In Windsor , however, the Court labeled at least half the population, including some of our most revered leaders and institutions, as motivated by a desire to injure and degrade some of their fellow citizens. This kind of talk will not help the nation come to peaceful resolution of this deep moral conflict.

Exacerbating the sense of illegitimacy sown by the majority’s accusatory rhetoric and its casual approach to legal doctrine was the question of jurisdiction. In both Windsor and its companion case, Hollingsworth v. Perry” the case challenging the constitutionality of California’s referendum limiting marriage to opposite-sex couples”the lawyers for the relevant units of government (the federal government in the first, the state of California in the second) chose not to perform their official duty of defending the law but instead filed briefs supporting the plaintiffs. In Hollingsworth , but not in Windsor , the Court held that this deprived the Court of jurisdiction to hear the appeal.

The question of jurisdiction in these cases was genuinely difficult, and I believe the Court was correct in both. However, the result in Hollingsworth exposes a separation-of-powers problem of the first order. The Court’s decision shows that, through the simple expedient of caving in to a constitutional challenge, an attorney general can effectively nullify a law passed by referendum or the legislature. This is wrong. With limited exceptions not relevant to these cases, the lawyer for the state has an ethical responsibility to his client, the people, to defend all properly enacted laws so long as there is a plausible and ethically responsible basis for doing so. The solicitor general of the United States and the attorney general of California were derelict in failing to do so in these cases.

It is to be feared that other attorneys general, in our increasingly politicized environment, will follow their lead, to the injury of constitutionalism and the rule of law. Imagine the protest if Mitt Romney had been elected president and directed his solicitor general not to defend the constitutionality of Obamacare. What we have is not a constitutional problem but a decline in the culture of law.

The constitutional law of affirmative action in college admissions has been a mess since Justice Lewis Powell cast his idiosyncratic but controlling vote in 1978 in Regents of the University of California v. Bakke . The Court had a golden opportunity to straighten things out this term in Fisher v. University of Texas , but it did not rise to the occasion. The Court made it marginally more difficult for universities to defend race-conscious admissions policies but essentially left the status quo in place.

There are powerful arguments for and against the constitutionality of affirmative action. Proponents say that the Equal Protection Clause was designed to forbid only some racial classifications: namely, those that promote or entrench systems of racial subordination. In this view, affirmative action plans are entirely in accord with constitutional values and should not be subject to the standard of “strict scrutiny” whereby the government must prove that its policy is necessary to achieve a compelling governmental purpose. Opponents say that the clause was designed to make the United States a color-blind society and that even supposedly benign forms of discrimination perpetuate racial inequality and reinforce stereotypes. In this view, the use of race as a criterion for admission by public universities (and perhaps private ones that receive public money) is wrong and should be permitted only for the most compelling of reasons.

The Supreme Court has rejected both of these views. While it says that all forms of racial classification are suspect and are subject to strict scrutiny, it does not mean what it says. College admissions offices can take race into account if it is one factor among many and if consideration of race is necessary to achieve “diversity” in the classroom for pedagogical purposes, but not for purposes of remedying the effects of past societal discrimination. In practice, this allows them to give race a large, and often dispositive, weight. If the Court meant what it said and genuinely applied strict scrutiny, it is virtually inconceivable that affirmative action as it is practiced in most universities could survive.

Take the rationale for the programs: “diversity.” If universities seriously believed in diversity, they would not be the bastions of ideological uniformity that they are. Why is it pedagogically more important to have students of a certain colors than to have students of diverse perspectives? Where are the programs to bring in more conservatives, more libertarians, more religious students and faculty, even more working- and lower-middle-class students and faculty? Indeed, the idea of “diversity” is based on the same kind of stereotyping based on race that the Court ordinarily condemns: the presupposition that a person’s race determines his mode of thinking. It is hard to see how this can be squared with the usual principles of equal protection.

Even if the rationale of creating diversity is accepted in principle, the Court’s preference for “holistic” admissions programs instead of “quotas” is difficult to fathom. “Holistic” systems are no less unfair to students who would be admitted if it were not for their race. The only difference is that this approach eliminates transparency and liberates admissions offices to indulge in whatever biases they may have. Who can doubt that admissions officers, most of whom are cookie-cutter academic liberals (“not that there’s anything wrong with that,” as Jerry Seinfeld would say), will view an applicant’s volunteer work for Obama for America as a public service plus but his membership in the NRA with distaste? If universities are going to take race into account, it would be better to do so openly and otherwise adhere to objective criteria for admission. One benefit: We could eliminate the silly personal essays from the ­application process.

But the Court in Fisher faced up to none of these questions, focusing instead on the details of administration. Texas law requires the state system’s flagship university to admit the top 10 percent of the graduating class of every high school in the state. In light of demographic residential patterns, this formally race-neutral requirement produces as much racial diversity as the old, explicitly race-conscious affirmative action program ever did. Moreover, the University of Texas’ administration insisted on layering race-conscious admissions preferences on top of the top 10 percent plan. They expected to prevail in court because the prior decisions, while mouthing the standard of “strict scrutiny,” permitted the courts to defer to the “academic” judgments of universities on these matters.

In Fisher , a seven-to-one majority, holding that strict scrutiny means something roughly like strict scrutiny, remanded the case to the lower court to determine whether the extra racial preference was truly necessary (“narrowly tailored”) to obtain the “educational benefits of diversity.” Proponents of affirmative action in college admissions greeted the decision with a mixture of glee and relief. If honestly applied, strict scrutiny should be fatal to affirmative action programs as widely practiced. But litigation is costly, universities are willing to spend vast sums of money on lawyers (or receive pro bono help from leading law firms), and few students have the tenacity and resources to mount a challenge.

Without clear principles”and the Court has avoided clear principles with great assiduity”it is difficult to imagine that much change will take place. Muddy law always favors the status quo, and that is how the court’s majority has maintained affirmative action for decades.

The only strong victory for the conservative wing of the Court was its invalidation of section 4 of the Voting Rights Act in Shelby County v. Holder , by a five-to-four vote, with the opinion by the chief justice. The left greeted this decision as the second coming of Bull Connor, even though it leaves in place all the act’s substantive protections for voting.

In reality, the decision, written by Roberts and joined by Kennedy, Scalia, Thomas, and Alito, was modest in scope. It holds that Congress may not treat states differently with respect to their control over voting qualifications”a control vested in the states by the Constitution”without some currently valid reason for the difference. In a world where minority voting turnout is higher in Mississippi than in Massachusetts, the old 1965 formula no longer makes sense.

All this may sound like common sense to those who see the changes in American racial attitudes since 1965. But common sense does not a constitutional holding make. What provision of the Constitution does section 4 violate? The Court several times mentions the “principle of equal sovereignty” among the states. But there is no such principle in the Constitution. The Fourteenth Amendment guarantees equal protection to “persons,” but there is no equal protection clause for states. There are a handful of provisions that require equal treatment of the states for specific purposes. Article 1, section 9 says that “no Preference shall be given by any Regulation of Commerce or Revenue to the Ports of one State over those of another,” and section 8 requires that bankruptcy and naturalization laws be “uniform . . . throughout the United States.” But there is no general-purpose “equal sovereignty clause.”

Indeed, the Court quotes Katzenbach v. Morgan” one of the Court’s most iconic cases, decided in 1966”as rejecting the notion that the equal sovereignty principle “operated as a bar on differential treatment outside th[e] context” of the admission of new states. The Court does not explain why that holding did not settle the matter.

The only constitutional provision that appears to apply to this case is the enforcement clause of the Fifteenth Amendment, which empowers Congress to protect voting rights “by appropriate legislation.” The Court quotes this provision once, in a discursive section detailing the sad history of voting rights discrimination in this country, but does not quote it when laying out why section 4 is unconstitutional. Indeed, the majority criticize the dissenters for basing their argument on the “appropriateness” of the law, as if this word were not the constitutional standard. I am left wondering why the wing of the Court that champions the importance of following the Constitution laid down by the framers would decide so important a case without explicit reference to anything in the Constitution.

The Constitution is what holds us together as a nation, and the Supreme Court is its voice. For several decades, the Court took upon itself a different task: to correct the nation’s ills, whether they contradicted the Constitution or not. In the past decade, a new spirit on the Court seemed to prevail: a greater modesty, a heightened commitment to the rule of law, a realization that hard moral and cultural questions are the province of democratic deliberation. This spirit cannot work unless both wings of the Court are willing to subordinate their ideological commitments to the force of text, precedent, and history. In the great majority of cases, this spirit prevails. Unfortunately, in the cases that matter most, when the public is paying the most attention, the temptation on the part of the Court to do good beyond the authority of law proves irresistible. Faulty legal logic is the tell.

Michael W. McConnell is the Richard and Frances Mallery Professor and director of the Constitutional Law Center at Stanford Law School, and senior fellow at the Hoover Institution. In this term of Court, he argued Horne v. Department of Agriculture and was on the briefs in Mutual Pharmaceutical Co. v. Bartlett , prevailing in both.