To choose a party's candidate for a general election, is the right answer.
Primary elections are the method by which citizens can show their choice for the candidate of their party, or a nominee in general, in forthcoming general polls, provincial polls, or by-election, to narrow the arena of nominees. The origins of the primary elections can be determined to the progressive movement in the U.S., that intended to exert the authority of contestant nomination from party leads to the people.
The admission of California into the United States was a divisive national issue because California's entry would upset the nation's numerical balance of free and slave states.