Since this stuff was admissible (was it?) I presume the judge found a colorable connection to the crime alleged.
But, as this DA just proved, you can't build a case regarding specific acts on innuendo and porn.
I think what we have here is not an "evil judge" but an overconfident, underprepared DA with a case built on shaky inferences and witnesses with credibility problems. And if he indulged in courtroom antics, he finished the job of alienating the jury that his witnesses started. That's a recipe for a loss, especially when the defendant can afford the best defense around.
I believe it was the jury who was not thinking, obviously.