Primary voting at the state level is an integral part of the American political system, whether for the national presidential election or statewide races. It functions as a mechanism to narrow the field of prospective candidates. Primary voting occurs over a period of several months in the spring before the general November election. In an "open" primary, voters can cast their ballot for a candidate of any party. On the surface, this seems like a perfectly democratic approach, but there are some disadvantages.
States that use an open primary do not require voters to register with a particular political party prior to the election. This openness has led to a strategy known as "raiding," in which voters aligned with one party decide en masse to cast their vote for the weakest candidate of the other party. When it works correctly, the raiders' true candidate will face off against a non-threatening opponent in the general election.
Perhaps the most nefarious nature of raiding in an open primary is that it thwarts the will of a political party to determine for itself, by members who are devoted to its ideals, which candidate will be their official representative for the fall campaign. Instead, it's possible a winner could be chosen by people with no interest in the long-term well being of the party in question. Open primaries operate according to a "gentleman's agreement" that each side will cast ballots in good faith for their favourite candidate in the party they would like to see win it all.
In reality, many open primaries have a feature called top two vote getters, which means that only the top two candidates advance to the general election. Since smaller, third party candidates rarely, if ever, manage to get their choice into the top positions of an open primary election, the party essentially finds itself shut out from the election process no matter which way they turn.
Another drawback of the open primary system is that it is not unusual to end up with the top two vote getters being of the same party, especially in areas where one major party's thought dominates. An example would be San Francisco, a bastion for the Democrat party. There simply aren't enough Republicans in the city to ever crack the top two spots, which results in two Democrats facing off. Any time you have two candidates from the same party involved in a debate, it draws the conversation away from the mainstream moderate point of view and toward a more ideologue-driven discussion.