Direct primary elections were introduced in the United States to limit the power of parties, to favor entry of new candidates, and to foster competition. However, a majority of incumbents faces no competition in their primary. We propose a formal model of primaries to rationalise this fact and analyse its welfare consequences. The party of the incumbent can influence the challenger's entry cost in the primaries. Primary challengers choose strategically to enter only when the incumbent is of low competence. Voters, who are poorly informed about the competence of candidates, use the competitiveness of the primary to update beliefs. We identify three sources of uncontested primaries: a lower bound on the challenger cost of entry; an absence of commitment to set this entry cost by the party of the incumbent; and an imperfect observability of the entry cost by voters. Regulation favoring challenger entry can benefit voters and even the party of the incumbent.