Would you prefer the government determine who is going to be the candidate for a political party?
The process of selecting a candidate to represent a party is up to the parties. The government shouldn't have anything to do with it at all. Which brings up the next obvious question:
Why the h*** does the government run primaries at all?
Political parties are private entites, not part of the government. Yet, the government spends millions of dollars each year helping parties choose their candidates. Why should my (hard earned) tax money be given to two private organizations? You don't see the government running primaries for the Libertarian or the Green party. Spending tax money to help two parties choose their candidates for the general election is not only an inproper use of public money, it creates a huge advantage for the two parties being subsidised by the state.
The Dems. and Repubs. get huge amounts of publicity and press coverage due to the government sponsered primary. It gives the impression in voters minds that there are only two legitimate parties. Other parties have just as hot and contested races for their party's nomination, but you don't hear about it because the state doesn't subsidize their party with a public primary.
What authority does the state have for running party primaries? The state is required to run elections. A primary is not an election. It is a party choosing a candidate to represent them in the election. The state has no authority to help or get involved in any way in how a party chooses its candidate for the election.