Having recently discovered how the nomination process works in the Republican Party, Donald Trump is furious. “They wanted to keep people out,” he bellowed. “This is a dirty trick.” In fact, Mr. Trump is right on the first count and wrong on the second. Political parties do have mechanisms to “keep people out.” But far from being a trick, they are the crux of what makes parties valuable in a democracy.

Clinton Rossiter begins his classic book “Parties and Politics in America” with this declaration: “No America without democracy, no democracy without politics, no politics without parties.” In a large and diverse country, to get things done, people need devices to navigate the political system, organize themselves, channel particular interests and ideologies, and negotiate with others who have differing interests and views. Political parties have traditionally played this role in the United States. And they have often played it as a counterweight to the momentary passions of the public.

At the heart of the American political party is the selection of its presidential candidate. This process used to be controlled by party elites — mayors, governors, legislators. In the early 20th century, an additional mechanism was added to test a candidate’s viability on the campaign trail: primaries. Still, between 1912 and 1968, the man who won a party’s presidential primaries became the nominee less than half the time. Dwight Eisenhower was chosen not by primary voters but in a complex, contested convention.

1968 was the year things changed. The radicalism that swept the Democratic Party also cast aside its rules for selecting nominees, favoring direct primaries over all else. The Republicans copied the Democrats, and soon the parties ended up with the system we have today. To choose their candidates for the November election, the parties simply hold prior elections. In this regard, the United States is almost unique among advanced democracies. Mostly everywhere else, political parties have not turned the nominating process into a plebiscite.

The result of these changes has been to hollow out political parties, turning them into empty vessels for the most successful political entrepreneur of the moment. In describing these trends in a book on democracy in 2003, I wrote that without strong parties, all you needed to run for president was name recognition and a fundraising machine. I predicted that the partyless system would be good for “political dynasties, celebrity officials and billionaire politicians.” The front-runners in both parties in 2016 fit this description.

This summer's political conventions could get heated – but it certainly wouldn't be the first time. (Peter Stevenson/The Washington Post)

What is the harm of this new open system? We can see it now. A party without internal strength and capacity cannot shape the political agenda. Instead, it simply reflects and amplifies the noisiest popular passions. The old system steered toward moderation because it was run mostly by local and state officials who had won general elections and then had to govern. Today, delegates are chosen by primary voters, a much smaller, narrower and more extreme slice of the country. It is ironic that the old smoke-filled rooms were in some sense more representative of the general voter than the open primaries of today.

The old parties drew their strength from neighborhood organizations, churches, unions and local business groups. The new parties are really just Rolodexes of Washington professionals — activists, ideologues, fundraisers and pollsters. These professionals are more extreme and less practical, and seek to turn large, diverse parties into ideological battleships. Rossiter’s declaration on democracy has a last phrase: “no parties without compromise and moderation.”

Primaries are not the only “democratizing” reforms that have crippled political parties in the United States. In Congress, party leaders used to be able to forge an agenda and get their members to vote for it. This hierarchical system began to break down after reforms of the Watergate era, which opened up the system, expanding the number of subcommittees and moving to internal party elections and open votes. The result has been chaos, dysfunction and paralysis. Reflecting on changes that his generation of politicians introduced, then-Sen. Joe Biden (D-Del.) noted: “We created more problems than we solved. . . . Nothing turned out the way it was supposed to.”

The old system is almost dead. In the current Republican race, it is trying to revive itself to save the party from a dangerous demagogue. This is not an assault on democracy. The people will vote in November, and that vote will be dispositive. Meanwhile, we have an effort by one of the core institutions of American politics to shape the choices facing voters in the November election. Sometimes to strengthen democracy, you have to restrain it.

Read more from Fareed Zakaria’s archive, follow him on Twitter or subscribe to his updates on Facebook.