|This is Party business. We're not doing|
Primary elections are mostly a new thing. The first was held in 1912 in Oregon, but it was a rare thing indeed. As late as 1968, only 13 states held primary elections. It was the entire point and purpose of a national party convention to bring the party's delegates together to choose their Presidential nominee. But, of course, we all remember the bloody and chaotic Democratic Party convention in 1968 in Chicago. The assassination of Robert Kennedy splintered the anti-war vote, Hubert Humphrey won the nomination, and while he only lost the popular vote by 0.7%, he was crushed in the electoral college by Richard Nixon. After that, the writing was on the wall. Both parties immediately began implementing changes to the selection process that would bring public sentiment into the process, while still retaining the ultimate nominating power within the party structure itself.
After the debacle in Chicago in 1968, where a viciously divided party in chaos ended up nominating a candidate who hadn't entered even a single primary, the party announced the creation of what became know as the McGovern-Fraser Commission. The commission announced a set of guidelines that would govern the nominating process in 1972 - both at the state level and at the national convention. Over the next several cycles, the party leadership became concerned that the commission rules had in essence "over democratized" the nominating process, allowing the voters too much control over what they viewed - properly - as an internal party function. So in the 1984 cycle, the Democratic party created a pool of unpledged so-called 'superdelegates' that could offset what they viewed as particularly tactically egregious voter selections. Over time, the Democrats have also adopted a proportional delegate allocation scheme that makes it incredibly difficult for an upstart challenger to overtake a party favorite.
Are these kinds of party rules undemocratic? Of course they are - the party has an interest in eliminating guesswork or randomness from the nominating process, and making sure they are fielding the candidate they feel gives them the best chance to win. Are they somehow dishonest or unconstitutional? Of course not. Those aren't descriptions that even have applicability to questions about the process. In the end, it is strictly an internal party process, the outcome of which the party leadership has a profound interest in. If you don't like the system, tough. You don't get a vote.