(CNN) For a president who professes to revere the US military more than any of his predecessors, Donald Trump gets entangled in a lot of scrapes that raise doubts about the sincerity of his admiration.

He has feuded with war heroes and the relatives of fallen soldiers, sparked controversy by ducking remembrance observances and been accused of using the troops to advance his political goals. He's said he knows more about ISIS than the generals do.

The President's latest spat with an admired military figure i s with retired Adm. William McRaven, the architect of the daring special forces raid into Pakistan that killed al Qaeda chief Osama bin Laden in 2011, acting on CIA intelligence.

This controversy, like the President's past run-ins with military heroes, was set off by Trump's perception that he was being unfairly attacked, apparently by a politically motivated critic.

When asked on Fox News Sunday about McRaven's warnings that Trump's claim that the media is the enemy of the people endangered democracy, the President lashed out, accusing McRaven of being a Clinton backer and in the camp of former President Barack Obama.

"Of course, we should have captured Osama bin Laden long before we did," Trump said, dumping on the military planners behind one of the most dangerous and audacious special forces operations in recent military history.

His response was characteristic for several reasons.

First, it reflected his obsession with his predecessor and apparent belief that anyone who worked in a past administration -- even as a nonpartisan military officer -- is somehow suspect.

Second, it underlined how the President sees almost every issue through a prism of how it affects his image and prestige. Trump's first instinct when criticized is not to move on or shrug it off, even in deference to a great soldier's sacrifice, but to see the critique as a motivated by political animosity.

The episode is a reminder of how the President tramples protocols as a matter of course in his normal daily rituals. The idea that any other recent commander in chief would take a shot at a military hero like McRaven, who is respected across partisan lines in Washington, is unthinkable.

The clash also shows that when the President thinks he has been attacked -- by McRaven, a senior former intelligence chief, or a former prisoner of war like the late Sen. John McCain -- nothing is off limits.

'Appalling and disgusting'

For someone like McRaven, who spent a long career serving presidents of both parties and stifling partisan impulses, Trump's tongue lashing must have come as a harsh blow -- even though he himself had criticized the President.

"The President shifted from the question, which was about freedom of the press, to insulting a retired four-star," said retired Lt. Gen. Mark Hertling, who is a CNN military analyst.

"It was just really appalling and disgusting that the President would describe him in that way," Hertling said on CNN.

McRaven made clear in a statement to CNN that he had not backed Clinton in 2016, though he said he did admire the leadership of Obama and former President George W. Bush, whom he also served in a senior role.

While Trump's words may strike many people as inappropriate, he had learned early in the 2016 Republican primary that he does not pay a political price for such comments.

Many political observers predicted that Trump's attack on McCain, who he said was not a war hero because the then-Navy pilot had been captured in Vietnam, would spell the end of his White House hopes. But instead Trump went from strength to strength.

Similarly, his insults thrown at the parents of slain Muslim US soldier Humayun Khan, who had criticized him from the stage of the Democratic National Convention two years ago, did not stall his White House run.

In a sign of how times have changed, the official GOP Twitter account, which in a past era might have been looked to for unquestioning support of a military hero, on Monday endorsed Trump's comments about McRaven.

In a tweet, the Republican Party said McRaven had been on Clinton's shortlist for vice president in 2016 and had been critical of the President.

"He's hardly a non-political figure," the tweet said.

A more difficult question is whether the President's behavior is damaging his credibility as the commander in chief, who at any moment could be charged with sending troops to fight, and possibly die, in a national crisis.

Leon Panetta, the CIA director and defense secretary under Obama, issued a strongly worded statement putting that issue in play on Monday.

"The President's statement criticizing McRaven for not getting Bin Laden sooner is patently ridiculous," Panetta said. "It demonstrates a profound lack of understanding of how our military and intelligence agencies operate, and undermines the President's own standing as commander-in-chief."

Given that the military is required by tradition and constitutional role to fall in behind the nation's civilian leadership, there is unlikely to be any public condemnation of Trump's criticism from serving officers.

Former officers often seek to avoid being publicly drawn into the fray too, though they are more free to hint at feelings percolating inside the military.

Retired Army Gen. Stanley McChrystal, who lost his job as commander of US forces in Afghanistan after he and some of his colleagues were quoted mocking Vice President Joe Biden and other civilian officials in 2010, said on CNN's "Newsroom" on Monday that soldiers in the field need confidence in their commander in chief and what he stands for.

"We have certain things we want and demand of leaders," McChrystal said.

"And to a degree, there has to be a confidence in the leader's basic core values. We have to be able to believe in enough of what that leader represents to feel comfortable following them, sometimes to our deaths."

Awkward moments

The controversy with McRaven, Trump's criticism of Khan's parents and his swipes at McCain are not the only awkward moments he has had as commander in chief. He was accused of not being sufficiently sympathetic in a 2017 telephone call to the widow of Sgt. La David Johnson, who had been killed in action in Niger.

His recent order of troops to the southern US border to deal with a migrant caravan that has yet to arrive has been blasted as a political stunt by critics. Earlier this month, Trump did not attend a ceremony honoring US troops killed in World War I outside Paris, citing the poor weather that had grounded his helicopter. He said in the Fox News interview that he should have gone to Arlington National Cemetery on Veterans Day when he returned. He has also yet to visit troops in a war zone, as his predecessors often did around national holidays like Thanksgiving. But he did attend the transfer of the remains of a service member killed in Yemen early in his presidency.

Trump frequently argues that no one has been more pro-military than he, and claims to have pulled the nation's armed forces out of a funding crisis.

And in many ways, he has honored his promises to be pro-military.

He secured a massive $700 billion spending bill that will mean new fleets of ships, planes, submarines, missiles and helicopters and the largest pay increase for military personnel in eight years, though his claim that it is the first wage hike for the troops in a decade is false.

Trump's affection for the military is emotional and political. He seems to see the troops as embodying qualities of power and masculinity he admires.

It's no coincidence that he has packed his administration with former generals. To hear him tell it, it often seemed as though he picked Gen. James Mattis as defense secretary because of his nickname, "Mad Dog."

Trump has often lauded hard-charging World War II Gen. George Patton as a hero. It may be no coincidence that the classic Hollywood biopic about the war hero opens with a rasping speech from star George C. Scott, who delivers an almost Trumpian monologue before a huge American flag.

"Americans love a winner and will not tolerate a loser," Scott says.

Trump attended New York Military Academy as a young man, where he was taught, according to biographer Michael D'Antonio, that "life is about survival" and he showed on the sports field that he would do anything to win.