The prevailing political narrative of this year and last is popular repudiation of clueless governing and media elites that are out of touch with the concerns of ordinary citizens. This is the story line that tracks, among other developments, the unanticipated rise of Bernie Sanders and Donald Trump and the startling fall of Britain’s membership in the European Union.

No doubt there is an element of caricature in this story, as all these phenomenons reflect complex interactions with voters. But there is an unmistakable element of truth in it as well. We were reminded of this by a recent U.S. Supreme Court ruling in which the justices demonstrated little familiarity with how the real world works.

In late June, the court unanimously overturned the conviction of former Virginia governor Bob McDonnell, sharply limiting the kind of conduct that can be the basis of corruption prosecutions. Only official, specific government actions can subject officeholders to corruption charges, the court ruled. Routine wheeling and dealing, such as setting up meetings or urging a subordinate to take a matter under consideration, doesn’t count, even when people seeking favors lavish gifts or money on officials.

In the case at issue, McDonnell, a Republican who was Virginia’s governor from 2010 to 2014, accepted luxury items, loans and vacations worth more than $175,000 from Jonnie R. Williams Sr., a wealthy businessman who sought help in securing state testing of a dietary supplement, ultimately without success. While the governor arranged meetings for Williams, made appearances with him and offered recommendations on his behalf, that in itself did not necessarily mean that McDonnell had entered into a corrupt bargain with Williams, given that the gifts were legal at the time, the court ruled. “Conscientious public officials arrange meetings for constituents, contact other officials on their behalf and include them in events all the time,” wrote Chief Justice John G. Roberts Jr.

Indeed they do, but common sense would tell most ordinary people that when such actions are taken for constituents who provide a Rolex or a vacation or expensive clothing, as Williams did, the political process has been perverted — or as Sanders might put it, the deck has been stacked in favor of monied interests. That’s why his primary-campaign attacks on Hillary Clinton’s acceptance of huge speaking fees from Wall Street resonated so deeply.

One of the little lies that politicians tell themselves is that gifts or campaign donations don’t affect how they conduct the public’s business. But don’t take our word for it. Jack Abramoff, the former high-powered lobbyist who served four years in prison for conspiracy, fraud and tax offenses, told The New York Times recently, “When somebody petitioning a public servant for action provides any kind of extra resources — money or a gift or anything — that affects the process.” Why? “Human nature is such that your natural inclination is, ‘He has done something for me, what can I do for him?’ The minute that has crept into the public service discussion, that is a problem.”

This is not, of course, the first time that the high court has displayed a not-so-charming naivete about the realities of political life. In its Citizens United decision, the court relied on immediate public disclosure of corporate and union financial contributions to candidates to offset any corrupting effects of unlimited money flooding into the political process. We all know how that worked out: As it happened, there were no such disclosure requirements. It seems clear that any reforms in this realm will depend not on the courts but on legislative bodies, which in turn will depend on the amount of public pressure exerted on them.