Elected justices are less independent than appointed justices. The public can vote them out of office if it does not like their decisions.
For example, in 1986, California Chief Justice Rose Bird failed in her reelection bid due to her opposition to capital punishment. In the sixty-one capital cases heard by the California Supreme Court while she served as Chief Justice, Bird never voted to uphold a death sentence. Governor George Deukmejian, a Republican, led an aggressive campaign against her. She was eventually ousted from office.
With information easily spread via the Internet today, Supreme Court justices are very likely to experience the same treatment. The public can reward or punish justices based on their rulings. To keep their jobs, justices may rule in favor of the popular view. The appointment system protects justices from such a dilemma. Appointed justices only need to worry about justice, not what is popular. Hence, this model of selection ensures judicial independence.
Another risk of the election system is that justices become susceptible to political pressure and special interest money. Instead of the legally correct or popular decisions, justices may rule in favor of certain business and political figures to finance their campaigns.
In terms of minority issues, the appointment system is also better than the election system. For example, research has shown that Supreme Courts with elected judges are less supportive of LGBT rights claims.
An appointed judiciary is the only solution to avoid the tyranny of the majority.
Additionally, elections might attract and reward candidates who are already predisposed to follow the popular view. The voting public is inclined to select and reselect pro-majoritarian justices. Hence, relatively populist candidates are more inclined to seek election. Compared to appointment selection, judicial elections are highly majoritarian.