It was actually the same for Democrats in 2008. Neither Obama or Hillary had enough primary votes to secure the nomination, so superdelegates in the DNC selected Obama over Hillary in a frenzy of phone calls and backroom deals.

That's when Ted Kennedy (a superdelegate) was called by Bill Clinton appealing for Ted to vote for Hillary, and Bill Clinton famously said to him of Obama's inexperience: "A few years ago, he would have been bringing us coffee!"

And Harry Reid in the same period said they chose Obama because he was black, but that he didn't speak in "ethnic black dialect" that would be "offputting" to white voters.

But hey, y'know, the DNC selects their candidates in the most representative and transparent way possible, they'd never usurp the will of Democrat state primary voters, and select a candidate based on cynical, backroom elitist or racist reasons... would they?
Oh, no, never! They've just done it before.