The judge, theoretically, is more of the expert on the law and whether it should be tried - but the CPS have to decide to bring the prosecution to him/her. Which is why you regularly get cases that should be seen in court, but which a suit decides is statistically unlikely to prosecute favourably.