The election of judges does better uphold public trust in the judiciary. When judges are elected by the people, they have some what of a say in who will be bringing justice to their area. When judges are chosen, some shady politics could be involved and the people have less of a say.
Public trust in the judiciary is best served by judges who are seen to be impartial and competent. The election process favors judges who are beholden to one political party, and makes it difficult for judges to remain impartial and stay out of the political fray. The election process also favors judges who have political connections rather than the most competent and experienced judges. For these reasons, appointed judges are more likely to retain the trust of the public.