Judges are just people. Some are good and some are bad. Judges should understand the political process better than the average person but that does not mean they function well or better in it. People make mistakes and that includes judges. When a judge is up for election, their work may not be up to par because they are focusing on other things. It might not be right but it is fairly typical.
I believe that if they focus more on why they're on the bench as opposed to their own benefit, they could function better in the political process. They are elected, just like any other seat. They should remember why we chose them in the first place and what they promised us.