I’ll be blunt: the justice system is completely overwhelmed and badly under resourced and cases are getting thrown out frequently for undue delay- eighteen months post charge, if a case hasn’t gone to trial, it’s likely tossed.
The justice system is really expensive. Judges and lawyers obviously get paid a lot. There’s a whole support infrastructure behind the scenes.
So, plea deals are necessary to help control the volume of matters before the courts. Is it distasteful at times? Sure. It also has other benefits though, such as saving the victims of violent crimes from having to testify. It also saves having to pull investigators or technical experts away from their duties for days of court (a lot of money is poured down the drain paying cops to sit in court - sometimes on overtime - waiting to be called to testify, if they even do.
So yeah, the rampancy of plea deals is not ideal, but it’s a necessary reality. Of all the many people I’ve ever charged, a strong majority have pled out.