I've experienced similar issues with judges. When evidence hinges on something very technical - they generally allow it and place the burden of arguing it on the defense. ...which often allows any other evidence gotten by that means. ...and even if/when it's struck out - the prosecutor uses some parallel construction argument to say they could have gotten the evidence through another means. ...and the judge usually accepts that too.
The prosecutor also then takes things like hearsay, circumstantial evidence, and literal misrepresentations to build a seemingly huge case against the defendant. It's a form of intimidation to accept a plea deal.
I've seen TONS of defendants admit to crimes they didn't commit in plea deals, just because it's such a huge and long uphill battle to fight every single bogus charge.
These aren't straight up innocent or perfect people. They're usually guilty of something minor - like small-time possession / solicitation / parole violation / DUI / etc... But what happens is that when you're guilty of anything, the judge treats you like you're guilty of EVERYTHING, and the prosecutor loads up the charges with anything they can think of to take advantage of that.
Most defense attorneys hate these cases because clients can't pay, so they encourage them to settle for a plea deal - even if it includes admitting to stuff they didn't do. ...and most defendants accept it so they can move on with their lives and avoid prison time.
So yeah, people with money hire $700/hr attorneys, and they absolutely make things go away. Even prosecutors drastically change demeanor when they see a defendant with a high-priced lawyer, because the prosecutor doesn't want to invest a lot of time on any specific case - and doesn't want his office or the police/investigators to be held up to scrutiny with various subpoenas - so charges drop off much more easily, and/or defendants get off with misdemeanor in a good plea deals.
The point of this story is to help shed some naiveté that you might have about the system ultimately being fair - even through the long and expensive appeals process. It isn't. ...and most defendants don't have the time or money to pursue appeals. And moreover, when tech is involved, it is markedly even less fair because the judge doesn't understand the tech, and so will believe whatever BS the prosecutor makes up.