Donald Trump is going to lose the presidential election. Both he and his inner circle know it. But he has a plan.

A fascinating exposé by Bloomberg Businessweek gives us a look inside the Trump campaign's online organization. Through data analytics, buying various mailing lists, and keen Facebook targeting, the Trump campaign has built a massive file of the nominee's enthusiasts — emails, phone numbers, credit cards — and is mobilizing these enthusiasts. Trump fans aren't enough to win a presidential election, but that's increasingly beside the point.

As with other Republicans, Trump is looking beyond November and into the future. The working assumption of most in the Republican establishment is that once Trump loses he will magically go away and then everyone can pretend he never happened. Trump won't let them. He has started a movement, one that his online operation is deliberately organizing to stay active beyond November. Between his Twitter account, his preternatural ability to seize the media spotlight, and a voter file with millions of voters, clickers, sharers, donors, and activists, Trump promises to be a political force for years to come.

But we can skip the political prognostications about what this means, because I want to focus on an important detail from the story. Trump couldn't have built up this arsenal without a key ally: the Republican National Committee.

Recall that one of the disappointments of the 2012 election was that Mitt Romney's online and data gathering operation proved very lackluster. Since then the RNC invested $100 million beefing up things, especially its mailing list. Trump worked out a deal to get the RNC's list, in exchange for 80 percent of the money raised using Trump's name.

This is — to put it as mildly as I can — very, very stupid.

As a politician, Trump's life goal is essentially to destroy the Republican Party and rebuild it as the Party of Trump. And so, of course, the Republican Party handed him a crucial weapon in this fight. For free!

It's worth really considering the monumental stupidity of this. Trump will, personally, own the voter file that the RNC gave him, for free — in exchange for cash that didn't come out of his pocket and that will be burnt after November anyway. It turns out Trump can negotiate deals after all. And that if the RNC's brain was a GIF, it would probably be an empty windswept tundra.

I mean, they're even patting themselves on the back! "This is exactly what the party needed the RNC to do — building assets and infrastructure and the nominee gets to benefit from it," RNC Chief Digital Officer Gerrit Lansing told Businessweek. Yeah, this is exactly what the RNC needed to do, buddy.

This is worth highlighting on its own, for what it says about Trump (he's never going away), and the RNC (burn it all down), but there's also a broader point here.

Throughout the summer, as Trump looked increasingly inevitable as a nominee, people like me made increasingly loud (and desperate) arguments that party leaders like RNC Chairman Reince Priebus should refuse to embrace Trump.

We mostly made arguments based on morality: Donald Trump is temperamentally unqualified to be president, he rejects the values the Republican Party is supposed to uphold, he built his candidacy thanks to appeals that should have no part in a civilized republic, and so on.

But it's worth pointing out that the party embracing Trump was not only dishonorable, it was also just really, really stupid. And this embrace is shameful not just in the abstract — say, in having to do with morality or the party's image — but in very practical ways, like handing out your mailing list to someone who will use it to make your life as painful as possible.

Great job, guys.