It has to do with incentives. When incentivized for the number of arrests and convictions, no one cares if it's the right people. Add in that there is almost zero penalty for prosecutorial misconduct unless it is extreme, and it's no wonder so many innocent people end up in jail.
Prosecutors play fast and loose to win the game, justice be damned.