U.S. District Court Judge Timothy J. Kelly restored CNN reporter Jim Acosta’s White House press pass on Friday, finding that the government had likely revoked his credentials without due process. The decision was straightforward and legally sound—but it was received with some surprise, because the president who appointed Kelly to the bench was also a named defendant in the case: Donald J. Trump. Vox put that fact in its headline; the Drudge Report highlighted it in a tweet; and virtually every outlet, including Slate, noted the fact in its write-up of the ruling.

Is it really that remarkable that a Trump-appointed judge ruled against Trump? It shouldn’t be, since federal judges are supposed to be shielded from politics. And yet it is reasonable to find Kelly’s independence pleasantly surprising. More so than his predecessors, this president has made clear that all of his judicial nominees will come to the bench with a precooked ideology that favors his party. It’s tempting to assume that these judges are also biased toward the administration. Fortunately for the republic, it’s not that simple. Not all of Trump’s nominees are party hacks. But far too many appear to have been chosen for their fidelity to the GOP platform—and to the president himself.

Plenty of writers, myself included, tend to note who appointed a particular judge when writing about his or her rulings. It’s a journalistic convention that, for better or worse, readers have come to expect, which illustrates just how cynical Americans have become about our ostensibly independent judiciary. Article III of the Constitution foresees judges who are sheltered from partisanship by their life tenure, as well as the Senate’s advice and consent function. In an era without entrenched political parties, the Framers seemed to think the wisdom of the Senate, combined with insulation from electoral whims, would create a judiciary capable of applying the law dispassionately.

That didn’t happen. The Supreme Court’s celebrated decision in Marbury v. Madison, which affirmed judicial review over federal laws, was shaped by a partisan dispute. Its notorious ruling in Dred Scott v. Sandford—which was leaked to President-elect James Buchanan before its release—was little more than a failed extralegal effort to resolve the slavery dispute. There are, no doubt, great moments in judicial independence, like United States v. Nixon, authored by Chief Justice Warren Burger, a Richard Nixon appointee. But in recent years, the court’s best-known rulings have featured five GOP appointees issuing decisions that benefit the Republican Party: Bush v. Gore, Citizens United, and the travel ban case, Trump v. Hawaii.

It’s startling to see Kelly do the right thing because there are so many reasons for him to do the wrong thing.

Trump has taken judicial partisanship to the next level. On the campaign trail, he declared that he would apply a litmus test for Supreme Court candidates: He would only nominate individuals, he said, who opposed Roe v. Wade and supported D.C. v. Heller, establishing an individual right to bear arms. (Hillary Clinton similarly boasted of her liberal litmus tests.) Trump also confirmed that he had a litmus test for all judicial nominees, requiring them to defend the “religious liberty” of religious corporations, adoption agencies, and colleges to engage in discrimination. He swore to appoint “conservative” judges to draw support from the right flank of his party. And he called Chief Justice John Roberts “disgraceful” for daring to uphold most of the Affordable Care Act.

Today, these comments seem unexceptional, because Trump has destroyed our brains. But Barack Obama did not pledge to appoint “liberal” judges, nor did he attack the merits of judges who ruled against his policies. George W. Bush forswore any litmus test, vowing instead to appoint individuals who will “strictly interpret” the Constitution. Strict constructionism is a mode of interpretation, not an ideology. And while most of the judges Bush selected were conservative, he did appoint a number of centrists, particularly to the lower courts.

Once in office, Trump did exactly what he promised. In addition to selecting vigorously anti-abortion, pro-gun judicial nominees, his advisers screened for hostility to the “administrative state.” Former White House Counsel Don McGahn was disarmingly candid about this goal: He said he wanted to limit the ability of executive agencies to interpret and enforce the law, because its “decisions tend to trend to the left.” That is only true if you think it is a left-wing pursuit to implement federal statutes that limit pollution, protect endangered species, bar predatory lending, outlaw housing discrimination, ensure workplace safety, and regulate health insurance. McGahn effectively imposed another litmus test on nominees: They must be willing to block federal agencies from carrying out their statutory duties.

These obligations do not necessarily compel loyalty to the president himself, only to his broader agenda. But Trump has left no doubt that he expects judges to toe the party line. When judges rule against him, the president attacks them personally, sometimes on Twitter, other times on national television. He accuses judges of undermining national security and facilitating Democratic obstruction. The message here is apparent: If you rule against the president and his policies, you risk triggering his very public ire.

Kelly is a qualified, evenhanded jurist. But he would have to be superhuman to ignore the immense political pressure that weighs on him in the Acosta case. It’s startling to see him do the right thing because there are so many reasons for him to do the wrong thing. We expect Trump’s nominees to do what Trump expects of them. That mindset marks a challenge to the Framers’ plan for an impartial judiciary. Over the long run, it’s a recipe for a weakened judiciary, as progressives may come to view the courts as hopelessly tainted by Trumpian partisanship.

Kelly’s decision on Friday was a victory for the legitimacy of the courts. But Trump’s nominees will remain on the bench for decades, and not all of them will be so independent. When Trump appointees overturn Roe v. Wade and demolish the New Deal, a large number of Americans won’t view them as faithfully interpreting the Constitution. They’ll recognize that these ostensibly unbiased judges are helping Donald Trump fulfill a campaign promise.