On Tuesday, followers of the Democratic presidential primary got an earful of what's been a strangely familiar sound lately: Underdog Democratic socialist Bernie Sanders defending the party's presidential frontrunner, Hillary Clinton. It was all thanks to to the man at the head of the GOP field, billionaire real estate magnate Donald Trump, who during a Monday night rally in Grand Rapids, Michigan unleashed an inflammatory, sexist attack on the former secretary of state. But still, you have to wonder: Why does Sanders stick up for Clinton?

Think about it, and you'll remember other little moments similar to this. Like when Sanders memorably reassured Clinton at a Democratic presidential debate in October that he and so many others were "sick of hearing about your damn emails." It made him look good, for sure, but it also provided a big boost to Clinton, effectively letting her know that she wouldn't face an in-party interrogation over that particular controversy.

So what gives? Why lend your ostensible rival a helping hand? The answer, as is so often the case in politics, is that everybody gets a little something. Obviously, pushing back against sexism is a just cause in and of itself. But when Sanders speaks out in Clinton's defense, he makes some strategic gains of his own, too.

JEWEL SAMAD/AFP/Getty Images

Whatever Sanders might think in his heart of hearts about his odds of being elected president, he's not a wild-eyed optimist, nor is he unaware of the daunting challenge he faces. Regardless of what the anti-Clinton wings of both major parties think about her, in addition to possessing the obvious support of the establishment and a cozy relationship with the Democratic National Committee, she's got huge leads in key battleground states, ones Sanders faces very long odds against.

As such, this really isn't the time for him to start breathing fire at her, unless it's demanded in a debate. The Clintons are well-known for their thick loyalty, and despite the current race, Sanders and Clinton have had a friendly relationship for years. If Sanders intends to have any considerable political impact in the years to come, it doesn't hurt to keep things largely warm with her. In the likely event that she wins the nomination and eventual presidency, she'll probably be more receptive to Sanders' input and influence if they avoid the kind of acrimonious battle that she had with now-President Obama in 2008.

Simply put, casually defending Clinton from some of the worst Republican attacks — Donald Trump's centrally among them, naturally — costs Sanders nothing major in the eyes of his supporters. But it does gain him some trust and appreciation from the Democratic majority, who definitely don't want to see their preferred nominee get torn to pieces by such a popular new progressive icon.

Andrew Burton/Getty Images News/Getty Images

This stuff goes both ways, too. Although Clinton's well-documented Wall Street coziness has made her unpalatable to a huge amount of Sanders' supporters, there will undoubtedly be a time when she needs to reach out to them. Just as in 2008, when Obama defeated Clinton, if and when Sanders drops out, you can expect "party unity" to be the theme of the day. The more Sanders runs an above-board campaign and goes out of his way to cast Clinton as a good, fair-minded person whom he simply disagrees with, the easier it might someday be for him to urge his supporters to vote for her in a general election.

And make no mistake, if that's what it comes to, he'll want Clinton to win. There's little space for grudges while the Republicans are banging on the White House door. Although the last Democratic debate was the most combative by far, it wouldn't be surprising to see a sort of basic cordiality extended throughout the rest of the campaign.