Under what circumstances is it up to a judge to deny certain defenses? Seems to be a First Amendment violation at least, among other problems.
It is complex. Not everything is allowed into a court.
One of a Judges primary duties is to only allow what is legally allowed.
In this case, the Supreme Court disagreed with the lower courts.
Judicial malfeasance is my take on this.