It's probably even simpler - the conviction is the deliverable produced by a prosecutor, and the thing that moves their career forward. So they are incentivized to always go for the harshest possible punishment, in the same fashion that a company chooses profits over everything else.
The system isn't malicious, it's just not designed to counteract this sort of thing.
The system isn't malicious, it's just not designed to counteract this sort of thing.