President Trump fired John Bolton for hating foreigners too much.

Trump wants to keep them out of the country. Bolton wants to bomb them in other countries. Trump loves talking to foreign dictators. Bolton hates talking to them, and not only because they don't speak English.

Bolton objected to Trump's meetings with Kim Jong Un, he objected to meeting with the Taliban at Camp David on the eve of the anniversary of the 9/11 attacks, and he objected to meeting with Iranian President Hassan Rouhani.

Bolton's views are unsurprising to anyone who has read them. In his book Surrender Is Not an Option, Bolton rejects "the accommodationist school of diplomacy," by which diplomats hold meetings for their own sake and not to achieve a concrete objective. Holding highly publicized meetings with belligerent foreigners is Trump's only objective.

"I disagreed strongly with many of his suggestions," Trump tweeted.

Trump hired Bolton because he liked watching him on Fox News. He got rid of him because he didn't like his views. To have views in the Trump White House means you have something other than loyalty.

In the second and final sentence of his resignation letter, Bolton thanked Trump for giving him the opportunity "to serve our country." Serving the country, not the president, was Bolton's mission. He could not do both.

After Trump tapped him to be his third national security adviser, Bolton said his views had not changed, which was the problem. If you work for Trump, your views have to adapt to Trump's whims. To remain in his good graces, you have to be as unscrupulous and capricious as he is, willing to nuke North Korea one day and falling in love with its dictator the next. You have to put Trump's interests above your country's and your own. Bolton refused to do so, and for that he was terminated.

Whatever you think of Bolton, he had an agenda that went beyond sucking up to Trump. Whereas Trump uses the presidency to enrich himself, Bolton tried to use Trump to shape U.S. foreign policy. Like everything in the Trump administration, it didn't work.

If there is a lesson to be gleaned here, it is that you cannot use Trump for the greater good. You cannot make lemonade out of Trump's lemons. Sooner or later, you have to sacrifice your principles, or Trump will sacrifice you.

In his third year as president, Trump has sacrificed many people. As National Review's Jim Geraghty points out, "In 31 months, this president has had two secretaries of defense, two acting secretaries of defense, two secretaries of homeland security, two acting secretaries of homeland security, two secretaries of state, one acting secretary of state, two CIA directors, and three chiefs of staff."

Like his predecessors, Bolton failed to implement Trump's foreign policy. That's because Trump has no foreign policy. Two years ago, Trump described it as "principled realism," which is as illogical as "polygamous monogamy." As a candidate, Trump said that unpredictability would be his primary aim as leader of the free world.

Trump's presidency has been predictably inane, insane, and incoherent. The Trump Doctrine is saying whatever you want to anyone at any time at any place for any reason. For Trump, the reasons are always the same: self-enrichment and self-aggrandizement.

Trump doesn't want advisers. He wants enablers, people willing to abandon their ideals for his benefit. Unlike Paul Ryan, Larry Kudlow, and Stephen Moore, who discarded their free-market doctrines at the altar of Trump, Bolton preferred to stand by his views than to stand by the president. Bolton may be a villain, but he is not a stooge.

For all of his disparaging comments about Bolton's mustache, it was Bolton's brain that irked Trump the most. Having a mind of your own is dangerous in an administration that views all thought as thoughtcrime, and heterodoxy as heresy. Trump's distrust of other people's brains is a totalitarian trait. In The Origins of Totalitarianism, Hannah Arendt observed, "Totalitarianism in power invariably replaces all first-rate talents, regardless of their sympathies, with those crackpots and fools whose lack of intelligence and creativity is still the best guarantee of their loyalty."

In the Trump administration, the less qualified you are, the more qualified you are.

Want more essential commentary and analysis like this delivered straight to your inbox? Sign up for The Week's "Today's best articles" newsletter here.