It’s true that the Supreme Court is not immune from partisanship. But nor do the justices always vote along party lines—even where the stakes are at their highest. In Ex Parte Endo, seven FDR appointees bucked the president. In United States v. Nixon, three justices who owed their seats to President Richard Nixon nonetheless voted to order him to deliver White House tapes to a federal district court. In the Guantánamo cases, the George W. Bush administration lost the vote of Justice Anthony Kennedy, who, despite his status as the “swing” justice for several years, was a Republican through and through. Chief Justice John Roberts has (twice now) disappointed the Republican Party by protecting the Affordable Care Act from potentially fatal attacks. Even Justice Neil Gorsuch has gone against the Trump administration on an issue—immigrant deportation—that we know is near and dear to the president’s heart.
And, yes, the court can be influential. That does not make it illegitimate. The court’s power rests on a broad consensus among elected officials and voters across the ideological spectrum that we are better off with robust judicial review than without. You can argue that the majority view is mistaken. But in light of the majority view, the argument that the court lacks legitimacy because it is countermajoritarian falls flat.