Pete Buttigieg pulled off a surprisingly successful presidential run. The 38-year-old former mayor of South Bend, the fourth-largest city in Indiana, was unable to win the race for chair of the Democratic National Committee three years ago. In the 2020 Democratic primary, however, he not only outlasted prominent Democrats like Sens. Cory Booker and Kamala Harris, but Buttigieg also effectively tied for first in Iowa and finished a close second in New Hampshire. He won more support than Sen. Elizabeth Warren, another party heavyweight, in all four early caucuses and primaries. And his sharp attacks on Warren (and her proposal for Medicare for All) in October and November were arguably one of the most important moments of the primary, helping blunt Warren’s rise when it seemed like she could become the race’s front-runner.

But beating expectations and winning primaries and caucuses are different things. By this past weekend, Buttigieg appeared to have little chance of winning the nomination, and on Sunday news broke that Buttigieg will reportedly end his bid for the presidency. He finished far behind Sen. Bernie Sanders in Nevada and way, way behind former Vice President Joe Biden in South Carolina. He had stalled out at around 10 or 11 percent in national polls, and there was a good chance he would fail to reach 15 percent — typically the threshold to win delegates to the national convention — in any of the 14 states voting on Super Tuesday and in a ton of congressional districts. It just didn’t seem like Buttigieg had a path to start accumulating delegates.

Just as important as the losing itself was the way Buttigieg was losing. More than 30 percent of Democratic voters are black or Latino. And the Democratic Party thinks of itself as the party that represents people of color. But Buttigieg never gained much popularity with black or Latino voters, punctuated by him getting an estimated 3 percent of the black vote in South Carolina.

It was going to be hard for white Democrats, both party elites and voters, to mobilize behind a candidate with such weak support among people of color as the center-left alternative to Sanders.

So Buttigieg’s departure may have seemed sudden, but it’s likely that the former mayor was going to struggle on Super Tuesday and possibly run out of campaign funds. So this decision is a face-saving move for him.

That said, I don’t think Buttigieg’s departure is solely due to his struggles. Elite voices in the Democratic Party have been worried that the multiple center-left candidates in the race — Biden, Buttigieg, former New York Mayor Michael Bloomberg, Sen. Amy Klobuchar, etc. — would divide the non-Sanders vote, potentially allowing the Vermont senator to amass a huge lead in delegates on Super Tuesday while his rivals finished below 15 percent in many states. South Carolina is only one state, but Biden’s resounding win there suggests that the former vice president can combine older, moderate voters, black and white, into a big coalition in a way that Buttigieg probably could not. So my view is that Buttigieg stepped aside in part to help the center-left bloc of the party consolidate around Biden. To some extent, he was being a team player.

Why would Buttigieg do that? The former mayor might genuinely think that Sanders would be a terrible nominee for the Democratic Party. But there is a potential upside for Buttigieg in making this decision too. At his age, Buttigieg has four decades to try to become president. In leaving the race now, he builds goodwill with Democratic Party officials broadly and Biden in particular. If Biden is elected president, it’s easy to imagine him putting Buttigieg in a top administration post that helps Buttigieg fill out his resume — think U.S. ambassador to the United Nations. And goodwill among party officials will help Buttigieg if, as I expect, he eventually runs for president again.

The Buttigieg departure, in fact, suggests that the Democratic Party establishment has learned some lessons from how GOP party elites allowed President Trump to win the Republican nomination over their objections four years ago. Perhaps Democratic elites are still organized and influential enough to affect party politics. In the time between the Nevada caucuses and today, you heard a bit of a freakout from Democrats concerned about nominating a democratic socialist to take on Trump. But that freakout resulted in some actions — prominent figures in the party urged some candidates to drop out and endorsed Biden. Buttigieg heard the message. If Biden is elected president, that will be a good outcome for the center-left wing of the Democratic Party — and probably for Pete Buttigieg as well.