The problem is, Judges don't really need to know nor read the law (or apparently, even be lawyers) because there's no consequence for being wrong, and in fact, many judges seem to take a perverse pleasure in wiping their asses with the law and sneeringly saying "What're you gonna do about it?"
A Judge could sentence anyone to death on the basis of "the 1st amendment is the right to bear pancakes" and when it gets appealed, so what? The judge doesn't get fired or demoted, gets paid the same wage no matter what, and could only ever be impeached through as long and hard of a process as the President, so in that courtroom, the 1st amendment is and shall always be the right to bear pancakes, and if you disagree, YOU'LL get thrown in jail for disrespecting the law.
This why so many judges feel invincible, and seem to think they outrank the President.
Then, when reality kicks in, and it turns out, the President doesn't gave to obey every district Judge on national or international policy decisions, they throw a tantrum and scream and cry, "BUT IN MY COURTROOM, THE 1ST AMENDMENT IS THE RIGHT TO BEAR PANCAKES!"