In a way, it can feel as though US primaries are the most democratic part of the American democracy. It means that anyone has a shot at becoming the president. You only need to successfully market yourself to the primary voters.
Primary voters. That's the problem. They constitute a miniscule percentage of the whole population. Those who vote are only those who deeply care about the direction of the party, without having the insight of running the party. And those who care deeply, are likely to have more polarized opinions, in effect not at all representing the whole voting population.
One of the principles of a democracy is to fairly represent the country's population. Primaries cause parties to polarize, thereby distancing them from the general population.
Sadly, the primary system is spreading. There are now a few parties, where the leader is basically elected by their members.