I certainly don't know the ins and outs of the judicial system but take Judge Kavanaugh for example, under oath as a lower court judge, he conceded Roe V. Wade was settled law.
Though, I don't condemn Moore without more info on the two times, he was removed from the Alabama SC and one of those times, I think had to do with those "Ten Commandments" and not gay marriage, when you start having Judges making the law, what's next? Accepting a police officer for making the law on his beat? I can see where these are troublesome issues.