Look, I don't disagree with you. I agree that electing judges is stupid. Nonetheless, for better or worse, this is the result of democracy.
Note that you could apply the exact same principle to argue that legislators should be lawyers. After all, if you're not trained in the law, how can you possibly write a law? Or understand the many subtle ramifications of the law that someone else wrote that you're voting on? And why stop at legislators? Why not accept, say, literacy tests? How can a citizen possibly make an informed choice at the ballot box if they can't read a newspaper?
The point I'm trying to make is not that electing judges is good, only that it is, at least in the U.S., a direct consequence of democracy. You may decide that democracy is more trouble than it's worth, and cite this stupidity as evidence. But what you cannot do is say that electing judges is stupid and also that you believe in democracy, because in the U.S. the one has followed directly from the other.