(CNN) Even after two years, President Donald Trump's assaults on US spy chiefs are shocking coming from a commander in chief.

The President's Twitter barrage over a global threat matrix produced by US intelligence agencies that contradicts with his idiosyncratic worldview is hardly a surprise given his past behavior. His habit of fashioning a truth that fits his personal prejudices and goals over an objective version of reality has been an undercurrent to his political career.

But when that often-successful political method is carried into the realm of national security, it can be deeply destructive.

"Recently he seems to put his political position, things he wants to achieve as political objectives, far above any informed assessment that the intelligence community is providing to him," said Carrie Cordero, a former counsel to the assistant attorney general for national security, on CNN on Wednesday.

Trump's shot at the clandestine community even has some Republicans, who are often loath to criticize the President, worried.

"I prefer the President would stay off Twitter, particularly with regard to these important national security issues where you've got people who are experts and have the background and are professionals," said Sen John Thune, a South Dakota Republican.

"I think in those cases when it comes to their judgment, take into consideration what they're saying. ... I think we need to trust their judgment."

Senate Intelligence Chairman Richard Burr declined to critique Trump's tweets, but he stood by the covert services.

"I have ultimate faith in the intelligence community," the North Carolina Republican said.

Trump's rejection of intelligence agency assessments that Russia interfered in the 2016 election rocked his ties with his administration's top spies during his first year in office. Often his goal seemed to be to grease his one-man flattery offensive toward President Vladimir Putin, which continues to this day.

His claim to have ended the North Korean nuclear threat with his photo op summit with Kim Jong Un defies CIA reporting, as does his assertion that ISIS is beaten "badly," which he has used to justify his snap demand last month for a troop withdrawal from Syria -- which also played into Moscow's hands.

Now Trump is inventing his own version of the facts to justify his withdrawal from an Obama-era nuclear deal because the deal was "defective at its core."

"The Intelligence people seem to be extremely passive and naive when it comes to the dangers of Iran," Trump tweeted on Wednesday, a day after damaging testimony by intelligence chiefs on Capitol Hill.

Why dissing American spies matters

It's unprecedented for a president to be so frequently and publicly at war with the intelligence community. The hostilities play directly to the advantage of foreign espionage services in places like Russia, China and Iran.

They create confusion among America's allies over US foreign policy. And the tension hits morale at agencies served by officers who lack high salaries and can sometimes be asked to put their lives on the line.

Trump's Twitter blast at Director of National Intelligence Dan Coats and CIA Director Gina Haspel on Wednesday was a characteristic response from a President who hits back hard when he is publicly embarrassed.

The Intelligence people seem to be extremely passive and naive when it comes to the dangers of Iran. They are wrong! When I became President Iran was making trouble all over the Middle East, and beyond. Since ending the terrible Iran Nuclear Deal, they are MUCH different, but.... — Donald J. Trump (@realDonaldTrump) January 30, 2019

But it was also another example of how the President prioritizes his own political goals when they conflict with the judgments of the intelligence community. Trashing the Iran deal was a key part of his 2016 campaign platform, and he had more to gain politically by following through on his promise than in reassessing based on the findings of US experts.

No one can work out why Trump is so solicitous of Putin. Perhaps Robert Mueller's special counsel report will shed light on Trump's mysterious past relationship with a nation that US intelligence officials say sought to help his 2016 campaign.

But his friendship with Putin requires him to continually cast doubt on the intelligence community's belief that there was a widespread election interference effort mounted by Moscow's espionage agencies.

Trump's most notorious dissing of US intelligence came during his summit with Putin in Helsinki last year, in a shocking public display of an American President siding with one of his nation's enemies over his own administration.

No longer the adults in the room

Trump's trolling of US spy agencies, and attempts to confuse the true tale of what happened in the election, provide a constant dividend for Moscow's attempt to sow chaos in the US political system.

But the tactic is not just helpful to Trump because it helps move his own personal political agenda. With his 2016 campaign a two-year target of an investigation first led by the FBI and then handed to Mueller, Trump likes to validate his outsider political crusade by claiming he is a victim of sinister "deep state" warfare centered in the intelligence community. The construct plays into conspiracy-minded sectors of the Trump base and reaffirms his image as a crusader against the elite Washington establishment.

It's ironic that a Republican President should adopt positions so at odds with his party's self-image as the adult in the room on national security.

GOP discomfort with his populist, nationalist attitude on foreign policy has become ever more obvious in recent days.

The Kentucky Republican's effort stands as a direct rebuke of Trump's plans to withdraw troops from Syria and developing strategy of halving the US garrison in Afghanistan.

"It would recognize the dangers of a precipitous withdrawal from either conflict and highlight the need for diplomatic engagement and political solutions to the underlying conflicts in Syria and Afghanistan," McConnell said Tuesday.

McConnell was positioning himself as the voice of the traditionally hawkish Republican consensus on foreign policy. Though it could be argued that on the idea of bringing troops home from long foreign wars, the President is more in tune with grass-roots opinion than his critics -- a view backed up by early exchanges in the Democratic White House race.

In another move that risked irking Trump, Senate Judiciary Committee Chairman Chuck Grassley of Iowa this week signed on to a bill that would require the release of a summary of Mueller's final report to Congress and the public.

Large numbers of Republican House members -- apart from a clutch of die-hard Trump supporters -- backed a bill overwhelmingly passed by the new Democratic-led House that put on record strong support for NATO -- which has been constantly undermined by the President.

But Republican rebellion goes only so far and is usually confined to national security, an area where GOP lawmakers can differ with the President without exacting a personal price among base voters that is too painful.

And it was noticeable that in the government shutdown drama that ended last week, and despite behind-the-scenes frustration among GOP senators, McConnell did not put any measure on the floor that would have undermined Trump's position.