Today the country and the Democratic Party are more liberal on gay rights. Thanks to the Supreme Court, gay marriage is the law of the land, and the integration of gays and lesbians into the military is official policy, something inconceivable as recently as a decade ago.

At the same time, the success of the Democrats in winning the popular vote for the presidency in every election since 1992 except 2004 has convinced most Democratic strategists that they don’t need socially conservative, economically liberal Reagan or Wallace Democrats any more. Many Democrats hope that the long-term growth of the Obama coalition, caused chiefly by the growth of the Latino share of the electorate, will create an all but inevitable Democratic majority in the executive branch and perhaps eventually in the government as a whole. The Clintonian synthesis of pro-business, finance-friendly economics with social and racial liberalism no longer needs to be diluted, as it was in the 1990s, by opportunistic appeals to working-class white voters.

This realignment within the Democratic Party requires Hillary Clinton to distance herself from many of the policies of her husband’s administration and to adopt policies favored by her party’s core constituencies. On issues from criminal justice to immigration enforcement, that is precisely what she has done. Even if she had not been challenged by Mr. Sanders, she probably would have done this anyway, because with the departure of the Reagan Democrats, the Democratic coalition has shifted to the left.

What, then, explains the appeal of Bernie Sanders? Part of the explanation, no doubt, is that, as she herself acknowledges, Mrs. Clinton is less charismatic a candidate than Barack Obama or her husband was, despite their similar policies and backers. Part of it is simply generational. Remember, many young people were as enthusiastic about Mr. Obama in 2008 as their counterparts are about Mr. Sanders today.

But on the social and racial issues that are important to today’s Democratic base, it is Mr. Sanders, not Mrs. Clinton, who has had to modify his message. At the beginning of his campaign, Mr. Sanders the democratic socialist focused in the manner of a single issue candidate almost exclusively on themes of class, inequality and political corruption. But because he is running for the Democratic presidential nomination, he has had to put greater emphasis on other issues, including racial disparity in policing and sentencing and the environment and immigration.

Having told Ezra Klein of Vox last July that open borders is “a Koch brothers proposal” that “would make everybody in America poorer,” Mr. Sanders recently criticized Mrs. Clinton for opposing drivers’ licenses for illegal immigrants in 2007. Mrs. Clinton, for her part, told a crowd in Henderson, Nev., in February: “If we broke up the big banks tomorrow, would that end racism? Would that end sexism?”

The centrality of identity politics, rather than progressive economics, to the contemporary Democratic Party is nothing new. In 1982, the Democratic National Committee recognized seven official caucuses: women, blacks, Hispanics, Asians, gays, liberals and business/professionals. Thirty-four years later, this is the base of the Democratic Party of Hillary Clinton. The pro-Sanders left objects to the solicitude of the Democratic Party for Wall Street and Silicon Valley, the sources of much of its funding. But it is safe to assume that most progressives, when confronted with conservative candidates, will prefer incremental, finance-friendly Clintonism over the right-wing alternative. Moreover, the ability or even willingness of Mr. Sanders to help down-ballot or state candidates is doubtful. The next generation of Democrats are figures like Julian and Joaquin Castro and Senator Cory Booker of New Jersey, who are much more in the mold of the Clintons and Mr. Obama than of the maverick outsider Bernie Sanders.