Based on the story above you didn't actually make a legal defense and appear to have gotten lucky this time. Seems you've found a nice tactic to make it appear like you are going to be more trouble, grand standing, in their courtroom than the ticket is worth.
Honestly I don't see a coherent legal defense in what you wrote. Do you haves something better up your sleeve for next time? It appears like you are just redefining what is a law and legitimate without much consistency but instead as it suits your needs in the moment. I don't know how well that would have worked out for you if you the case hadn't been dismissed for lack of evidence.
That being said, I hate tickets for stupid shit like you described and encourage everyone to clog the system and fight them. I am glad to hear you won regardless of the method. I hope you never have to try that legal defense out again. Best of luck!
He isn't making a legal defense.
He is putting the judge on notice that he knows what the game is, which tells the judge that he has two realistic choices:
The judge took the easy (and smart, IMNSH Opinion) way out and simply dismissed the case out of hand, completely avoiding any potential record containing publicly queryable information.
Sometimes the best defense is letting them know that you know the game they are playing.