The question of how to get judges in office is an ongoing debate in the justice system. On the plus side, elected judges have accountability to the public for their actions. But you end up with politicians on the bench, and decisions being influenced by the political impact of the outcome, especially as you get closer to the elections. Appointed judges have the benefit of being free from politics, in that decisions can be made solely on the law with no regard to potential electoral ramifications. On the negative, though, you end up with judges who have no accountability to the public they are appointed to serve. So states have tried to split the difference, with judges who are appointed but there are retention votes by the public to determine if the appointment should continue. In theory, you get the best of both, in that you have judges who can act solely on what the law says without concern about having to explain decisions each election cycle. In reality, you end up with what becomes a lifetime appointment because an uninformed electorate simply votes for the incumbent, just as they tend to do in most elections. Without some judge seriously screwing the pooch and creating an organized effort to remove that judge, you usually keep the same faces on the bench.
What's the best answer? Don't know. All I do know is that I'm quickly learning that my 23+ years of experience as a prosecutor and judicial officer seems to be less important to the party than my lack of history serving the party, working on elections in the past, and blindly supporting past candidates. The fact that as first as a prosecutor assigned as a civil attorney to the board of elections, and now as a judicial officer that I am prohibited from publicly supporting a candidate is irrelevant. Oh, and my private support for a local teacher's union who went on strike (for all the right reasons, IMHO), was against the party platform, and is a black mark on my potential candidacy.