One of the most confusing shifts of the Trump ascendancy is, on reflection, one of the most clarifying.

Donald Trump’s, Sarah Palin’s and Sean Hannity’s embrace of Julian Assange — who has made a career of illegally obtaining and releasing documents damaging to U.S. interests — is not just a puzzling policy shift. It is the triumph of political tribalism over, well, every other principle or commitment.

All three leaders of right-wing populism once saw the risk. Not long ago, Trump recommended the death penalty for Assange. Now he publicly sides with him against U.S. intelligence services. Palin urged the United States to go after Assange “with the same urgency we pursue al-Qaeda.” Now, we have seen her abject pleading: “Julian, I apologize.” Hannity once called for Assange’s “arrest.” Now he provides a sympathetic platform for Assange’s (and thus Vladimir Putin’s) views.

Let’s be clear about what this means. The president-elect of the United States is elevating a man whom the director of national intelligence, James R. Clapper Jr., holds responsible for putting the lives of operatives in direct danger. The 2008 Republican vice presidential nominee is bowing and scraping to the man who materially aided the Taliban. Fox News is now an outlet for the Russian version of events.

All this raises practical questions. If I were a prospective intelligence asset — an Iranian nuclear scientist, say, or a North Korean general — why in the world would I cooperate with a country that can’t keep secrets and apparently doesn’t care to? How will the CIA and other intelligence agencies deal day to day with a president who distrusts and publicly defames them?

But the most illuminating question is this: What changed about Assange between these dramatically evolved judgments? Nothing. Except that Assange hurt John Podesta, Hillary Clinton and the Democratic Party.

It would be difficult to formulate a purer example of motivated reasoning and tribal politics. We are dealing with political and moral argument at this level: Trump is good. Assange helped him. So Assange is good.

It does not require Aristotle to understand that this is a child’s view of ethics. The enemy of my enemy may be my friend. Or he may be an international fugitive who effectively exposed intelligence sources and methods and gave advantages to America’s enemies.

It is Ethics 201 that some principles should be universally applied, even when they conflict with our immediate interests or the interests of our own tribe (however that is defined). Where do those principles come from? There is the Golden Rule, which pops up, in different forms, in many religions. There is the moral example of parents and mentors, imprinted on our souls. There are various philosophic systems that force us to consider the views and interests of others.

It needs to be said that loyalty to a tribe is not always a bad thing. Being an American is to belong to a flawed but wonderful tribe. Considering yourself a Republican or Democrat, a conservative or a liberal, the member of a church or club — all can be appropriate forms of loyalty. Our views and loves naturally bring us into contact and friendship with those who share our views and loves.

The problem comes in the order of the loves (with credit to Saint Augustine). The argument we are seeing on Assange — if it hurts liberals, it is good — is a disordered and destructive form of service to Trumpism. And it is particularly disturbing in this case, because Assange has purposely and undeniably hurt our country. So it appears that the tribalism of ideology is actually deeper and more profound than the tribalism of being an American.

I know this endorsement of politically expedient subversion has happened on the left as well. Those who deny it — those who can only identify destructive tribalism in others — are part of the problem. Assange was a hero in seedier back streets of the left when he seemed to be an opponent of militarism and imperialism. Now: Trump is bad. Assange is helping Trump. So Assange is bad (and the CIA is suddenly the voice of reason).

But this problem is currently more pronounced on the right, since it controls just about everything in Washington. For some right-wing populists, anyone who opposes Trump is the enemy. The same attitude, shifted to the White House, might be applied by the president as: Anyone who opposes me is the enemy.

This would be the beginning of a nightmare.

Read more from Michael Gerson’s archive, follow him on Twitter or subscribe to his updates on Facebook .