It would be very interesting what would happen to the law if it would be possible to “overdefend” as well. Like get damages back if your innocence can be shown to a “preponderance of the evidence.”
THAT is the key to all of this—money. If the loser pays or the “over zealous” prosecutors can be held accountable in some way, our legal system would change over night! Right now, they throw any and everything to see what sticks whether warranted or not. And the defendant pays and pays and pays. It’s whoever has the taller stack of cash that wins, even if they lose.