John Avlon is a CNN senior political analyst. The opinions expressed in this commentary are his own. View more opinion articles on CNN.

So why does Team Trump spend so much time pumping up Bernie Sanders?

Spoiler alert: It's a trap.

But let's look at the evidence. For weeks, President Trump has been rushing to Bernie's defense and accusing Democrats of rigging the primaries against him.

He accused Democrats of timing his impeachment trial to hurt Bernie Sanders' chances, an allegation dutifully echoed by House Minority Leader Kevin McCarthy and Don Jr

The President was at it again on the eve of the Iowa caucus, tweeting that the Democratic National Committee was trying to "rig the election against Sanders," even as he called Bernie Sanders a "communist" in a pre-Super Bowl safe-space interview with Sean Hannity on Fox News.

It's been a repeated riff for months. Conservative commentator Hugh Hewitt on "Meet The Press" announced that he was voting for Bernie in Virginia's open primary -- because he wanted a clear contrast between an authentic socialist and Donald Trump.

This isn't subtle. Team Trump wants to run against Bernie Sanders. If you don't believe me, just ask them.

"We're trying to promote the rise," an unnamed Trump adviser told Jonathan Swann from Axios. "The campaign has been pumping up the national messaging behind Bernie, pushing out fundraising emails. When you attack his policies, it gets the media to talk about him."

Out from behind the veil, GOP consultant Ed Rollins tweeted out an anti-Warren ad, saying: "Our SuperBowl is facing Bernie Sanders in the general. What's the best way to ensure @realdonaldtrump faces Crazy Bernie? Making sure Dem primary voters really get to know Elizabeth 'Pocahontas' Warren."

So why does the Trump team want to pump up Bernie Sanders' chances? Hint: It's not because they share some of the same protectionist impulses on trade or isolationist impulses on foreign policies, as Trump has argued in the past. And it's not because Trump and Sanders were the two candidates being pushed by Russian trolls and bots in the 2016 election.

It's because Donald Trump does bes t running against a self-described socialist, beating a socialist by an average of six points, despite currently losing to the named top-tier Democratic candidates in head-to-head match-ups.

The candidate who has consistently done best against Trump head to head -- including in crucial swing states -- is Joe Biden.

That's why Republican senators are trying to double down on Donald Trump's lie that Joe Biden's public intervention against a corrupt Ukrainian prosecutor was itself corrupt. The President has just been impeached for withholding military aid until Ukraine announced an investigation into his most formidable political rival. This was designed to take Joe Biden off the field, but it backfired.

That hasn't stopped Republican Sen. Rick Scott from running an ad called "Biden Got Away With It," or Sen. Joni Ernst of Iowa saying on the eve of the Iowa caucus that Joe Biden could be immediately impeached if he wins. These are fact-free scare tactics because Republicans don't want Trump to run against Biden.

But what about Bernie? Let's give the man some credit. There's no question he has an intense and enthusiastic following. He is an authentic ideologue -- an avowed Democratic Socialist who has the courage of his convictions for decades and succeeded in changing the terms of the debate within the Democratic Party.

If he wins Iowa, polls show that he could win New Hampshire -- which he won in 2016 -- and have a strong shot at the next caucuses in Nevada.

But don't forget that less than a quarter of Democrats call themselves "very liberal" -- and in general, Democratic voters are older, more moderate and more blue collar than you might think if you gauge opinion only on Twitter, as Harry Enten has persuasively argued

Sanders' support for ending private health insurance in favor of Medicare for all isn't popular -- while the public option backed by Biden, Buttigieg and Klobuchar is even supported by 41% of Republicans. And the very label "socialist" -- along with Sanders' record of defending the Castro regime in Cuba and the Chavez-Maduro regime in Venezuela -- could seriously damage outreach to Hispanic voters in Florida and elsewhere.

Get our free weekly newsletter Sign up for CNN Opinion's new newsletter. Join us on Twitter and Facebook

The Trump team has made it very clear that its campaign will be based on negative partisanship -- demonizing Democrats as radical socialists to distract from the President's broad unpopularity. The bottom line is that they can do that with impunity against an avowed Democratic Socialist such as Bernie Sanders. That's why they're pumping up his candidacy, trolling concern about a "rigged system" while also calling him "crazy" and a "communist."

We'll find out in Iowa and over the next few days whether Democrats avoid the trap that's being set for them or whether they'll leap right into it, enjoying the exhilaration of ideological purity before they collide into the reality of a general election.