At least two candidates must be on the general election ballot for every office, except when a candidate ran unopposed in the primary election.
Idaho is a great reason why this is a good idea. Idaho, as you are undoubtedly well-aware, is a HEAVILY Republican state. There are exactly eighteen Democrats in the state legislature - eleven in the House, seven in the Senate. In a LOT of districts you can't get a Democrat to run for office. For instance, Idaho Senate District 1 - the people who inflicted Scott Herndon and Heather Scott on the rest of the state - hasn't had a Democrat on the ballot in years in either house. The Idaho GOP has closed its primary, so unless you're a registered Republican you are effectively disenfranchised in SD 1.
Now, if you go to Benewah County there's only going to be one candidate for Coroner every year because only one person ever wants the job. (For many, many years the Coroner was Ron Hodge, the only funeral director in town. Before that, the five doctors in town passed the job around between themselves.) But in races where there was opposition in the primary, they have the obligation to pass two names onto the General ballot and allow the entire community to pick who they want.
If you go to the next state on the left, Washington does this very thing: the top two vote-getters in the primary, regardless of party affiliation, advance to the general election. There are a LOT of districts in the middle of the state that have two Republicans on the general election ballot in every race.