People seem to have a very misinformed view of our justice system. There are massive case loads, not enough qualified subject matter experts, or specialized investigators, and are generally understaffed in every way.
This holds for prosecution and defense, and the wealthy and the powerful, have the ability to sink massive resources into a court case, the best legal minds, possibly multiple of them, they generally have the ability to vastly manipulate the evidence, and generally have legal advice on what not to say, and avoid self incrimination.
On top of that, they will hammer the prosecutors office, to cross every t, and dot every i, and nail them in court if they don't. Not to mention the ability to file endless motions, continuances, etc...
So when it boils down to it, does the prosecutors office spend a massive percentage of their budget and man power on a single case, at the expense of tons of other cases that are seemingly straight forward? or do they cut them a deal.
A big case against the wealthy, has a high probability the prosecutors will fail to gain a conviction, it will have press, and losing will hurt the DA's chances for re-election.
When you break it down, the wealthy, will always have a massive advantage, they doesn't have to be any corruption, friends influencing the courts, etc... (though many have that too)
Its a battle of financial and time attrition, and the prosecutors have far less of it to dedicate to any single case, that a millionaire.