Bt, you're posting gibberish, in the sense no one is arguing that the Judge can't take advancate of how PA law is written. A Judge SHOULD rule via the law. THAT's how the Constitution works. THAT's how the judicial system is supposed to work.
Back to square 1
Fact, Judge made a deroggatory racial comment in his ruling
Fact, judge disregarded a plea, mutually arranged between the Defense & Prosecution, with no lawful reason (yes, he can lawfully do that, but that was never the issue, and your continuing to harp on it as if it is, simply undermines your own subsequent conclusions)
Deductive reasoning presents a reason by the Judge that was racially motivated, and not bound in any law, as the judge provided none, your defensive efforts, not withstanding
Fact, judge subsequently recused himself
Fact, a 2nd judge accepted the plea