Isn’t this a great example of what the OP was talking about?
You did not get off because of absolute innocence, but “technical minutiae as if they are source code”.
But it does answer the OPs question, some are better at navigating it.
I don't think it's "technical minutiae"; I was charged with an offence that I didn't commit. My advocate just took the trouble to read the Act that I was charged under. Given that the court knew I hadn't committed the offence I was charged with, it would certainly have been a miscarriage of justice to go on and convict me anyway, and I could have got it overturned on appeal.
You said you were speeding, right? But somehow the judge can't just say "ah right, looks like it's the wrong traffic statute that's been filed. Here's a fine for whatever it was that you actually did, you can just settle it here or we do a proper trial if you disagree".
I mean of course we don't want people to be convicted of things they didn't do, but how is it ok for someone to get away with something they did do, just because some bureaucrat picked the wrong law?
I don't think judges should be able to go off-piste like that. In this country, charges are laid by the CPS, and adjudicated by courts, and not vice-versa. In the US, I believe (based on TV courtroom dramas!) that judges have more latitude.
In fact my "judge" was a panel of lay magistrates. They must consult the Clerk of the Court (a trained lawyer) if they have any doubt about their decisions.
I like this system; I'm not keen on the idea of a judge being able to change the charges on me at trial. I think the prosecution were given the opportunity to go away and get the charge altered; but they gave up (it was 30 years ago, memory falters).
Look, I deserved to be penalised; I would have simply put my hands up, but I had to go to court to make a mitigation plea, because I risked losing my licence.
My point was just that a really good advocate is head-and-shoulders above the crowd.
> somehow the judge can't just say "ah right, looks like it's the wrong traffic statute that's been filed. Here's a fine for whatever it was that you actually did
We shatter the powers to bring and adjudicate charges. This creates inefficiencies, like this. But it also brings stability. (More practically, the judge may not have all the facts and circumstances relevant for citing the person.)
Due to historical procedural abuses, modern societies insist that due process is as high a bar to prosecution as guilt of the offense for which a defendant is charged. The courts don’t want to be used as a forum for detective work, either. They just want to hear the case as presented, issue a judgment, and move on to the next case.
This is way more common than people realize, and one of the reasons courts accept "no contest" and pleas so often, especially in things like traffic laws.
But it does answer the OPs question, some are better at navigating it.