President Donald Trump held a raucous rally Tuesday night and let out his campaign trail self again.

Gone was the teleprompter, in were the ad-libbed attacks on his enemies.

And Trump certainly had a lot of foes to attack in Phoenix, Ariz.

He went after unnamed Republicans who didn’t vote to repeal Obamacare and were weak on the border. He attacked Antifa and accused them of starting violence throughout the country. And of course he ripped into his favorite enemy of all: the media.

Trump claimed the press distorted his comments on the violence in Charlottesville, Va., arguing that he strongly condemned white nationalists and neo-Nazis. The president went on to say that the media holds a grudge against him and that journalists are “sick people” who probably “don’t like America.”

He also singled out The Washington Post (which he dubbed a lobbying tool for Amazon) and his favorite punching bag, CNN.

Besides attacking his enemies, Trump promised to deliver on his campaign promises of building a wall, enforcing protectionist trade policies and other issues. He also vowed to stand up for “our history and our heritage” from the leftists who wish to destroy all politically incorrect statues.

Naturally, the rally made the media melt down, which in turn helped Trump point to the ridiculousness of his enemies.

Let’s take CNN’s reaction to the rally.

Right after the event, CNN host Don Lemon went on an hysteric, melodramatic rant about how the president was “unhinged.” The rest of CNN’s talent took up this line and began insinuating Trump was suffering from some mental ailment that made him unfit for office. (RELATED: CNN Obsessed With Donald Trump’s Fitness)

And journalists from CNN and everywhere else reiterated the “Trump is inciting violence against us!” line in response to him criticizing them. (RELATED: Trump Rally Leaves Media Fearing For Safety)

There have so far been no attacks on journalists from Trump supporters (Antifa, on the other hand, is a different story), but that still hasn’t stopped them from screaming they are about to be murdered by a MAGA hat.

To the president’s base, this makes his enemies look utterly ridiculous and reinforces their support for him. It also undermines their credibility to Trump’s base and makes the folks more likely to disbelieve anything they report about their man in the White House.

And it’s not just the media who take a serious hit from these rallies. Republicans who suffer from Trump’s wrath at these rallies are hurt even worse.

The president currently has a major problem getting legislation passed. There is also a fairly significant number of Republican lawmakers who are willing to publicly criticize the president.

With rallies directed at shoring up support from his base, Trump is able to hit back at his GOP foes and possibly get them in line with his agenda.

No Republican is going to attract the thousands Trump can draw for a rally or set the narrative like the commander in chief can. Coming under attack from the president makes them a vulnerable target during primary season, as Arizona Sen. Jeff Flake can attest.

Frequent rallies may serve as a more effective tool for pushing legislation than relying on Capitol Hill insiders to do the job. The latter didn’t work with repealing Obamacare, so maybe it is worth going straight to the people to get funding for the wall and other legislative goals.

That hits at the most important function of the rally: reinforcing support for the president among his voters. It’s clear at this moment that Trump is not going to be a unifying power while in the Oval Office — no matter what he does.

The people most upset with Trump’s off-the-cuff remarks and jokes are never going to be placated by the president. The media, Democrats and NeverTrumpers are not about to embrace Trump if only he would stop making jokes about CNN. To even try to appease these enemies, Trump would run the grave risk of alienating his core supporters — a possibility that would leave him without any support.

It makes far more sense for the president to double-down and reaffirm his commitment to his base. The rallies bring him out of the White House and in touch with the issues those supporters care about. As he did during the campaign, he honed his message to what earned the biggest applause lines. “Build the wall,” “Drain the Swamp,” etc.

At a rally, he gets to reconnect with the pugilistic politics that earned him the GOP nomination and eventually the presidency. His fans love his jokes and statements, and are even more amused by the media’s hyperventilating about them.

There’s pretty much no chance he will become the uniter-in-chief — the country is too polarized for anyone to assume that role, much less Trump.

To survive the next four years, Trump is going to have to wage the kind of cultural war his supporters want. The stump speech will serve him well in that mission. (RELATED: Trump’s Culture War)

Follow Scott on Twitter and buy his new book, “No Campus for White Men.”