The basic premise of democracy, in the words of Menkin, "is the theory that the common people know what they want, and deserve to get it good and hard". At it's heart, it supposes that the common people may get it wrong from time to time, but in general will get it right more often than not.
I think that it does no such thing. Democracy doesn't give people what's best for them. It maybe gives them what they deserve, which isn't the same thing. But a party which takes it's namesake from the concept shouldn't have super delegates, block undesired candidates from meaningful competition, or tilt things in favor of elites regardless of law.
The state shouldn't run or direct primaries at all. Parties should. In the case of Trump, some courts are deciding on primaries, which shouldn't be their concern, given we're not taking general election ballots which are.
It's just like the free speech thing. Obviously, the first amendment only applies to government restrictions. But the spirit of the thing... Tolerance and the marketplace of ideas and all that... goes beyond whatever the law says.