This typically happens only in crime infested areas. They don't have the resources (funding, jail space) to lock up everyone who deserves it. The courts are also booked, so plea deals are the rule.
Detroit (Wayne County) is a good example. Offenders who would receive jail/prison time in nearby Oakland County for the same crime are often put on probation and released.
The mass shooter at Michigan State University had been previously arrested for carrying a concealed weapon without a license, but it was pled down to a misdemeanor. That allowed him to buy another gun from an FFL. They could have tacked on Felony Firearm charges (mandatory 2 years), but that's seldom done.
I firmly believe that if weapons charges weren't negotiable/avail for plea bargains, and mandatory charging for them every time, it would make a significant difference.
The three strikes laws looked great on paper, but ultimately, it comes up against the laws of physics. mainly, the one where two bodies of matter cannot occupy the same space at the same time.
As a result, three strikes laws became political toilet paper.
There just isn't any good solution left that won't bolster wood chipper sales and service. Some of us might not mind, but something with the appearance of genocide would not bode well come time for reelection.
I understand the issues with the courts being overbooked and the prisons overcrowded. I also understand that nobody wants to pay higher taxes to increase the budget for more police, courts, judges, and prison space. These things cost money - a LOT of money. But what is the cost to our society - in terms of both financial and physical/emotional damage? I believe these costs are much higher, just not as easily measured or visible to the average taxpayer. Especially when you include all the costs for the police and courts to keep investigating, tracking down, arresting and prosecuting the same bad actors over and over and over again.
We need to convince people to change the whole paradigm.
1) Beef up the criminal justice system. More police, judges, courts, and prosecutors - but they won't have to be permanent - more about that later.
2) Increase the number of prison beds. This can be done for a LOT lower cost than the way we are doing it now. Incarcerate lesser offenders in tent cities - WAY out in the middle of nowhere. Like Arpaio did in Arizona. Save the space in the permanent higher security facilities for those who commit violent crimes.
3) Make inmates WORK to earn their keep. No work, no privileges, just the bare necessities. Prison should not be a mobility-restricted country club. It should be unpleasant.
4) Make them serve their time - or at least a certain minimum percentage of it - say 80% - 90%, and they have to earn any time off by restitution.
5) Make minimum sentences for violent offenses non-negotiable. Including all crimes committed with a gun.
6) Pass a 3-strikes law at the Federal level
7) Reinstate capital punishment for a specific set of the worst crimes, and limit the number and the grounds for appeals to new, material evidence, not minor technicalities. Yeah, I know "what about people who are wrongly convicted?" In the case of capitol crimes, with modern forensics, the instance of wrongful convictions are infinitesimally small.
If we could push through those kinds of reforms, the direct cost to taxpayers for judges, courts, and prosecutors would go up - temporarily.
But if going to jail is a really unpleasant experience, and they have to serve significantly more time, petty criminals will have an incentive to NOT become repeat offenders. Over time the number of petty criminals incarcerated will decrease - and that will decrease the associated costs.
As the number of of hard-core criminal types kept behind bars increases, the recidivism rates will also decrease. If they face lifetime incarceration for 3 strikes and the death penalty for crimes like murder, rape, etc. even the hardcore types are likely to change their ways. And if the worst of the worst are actually executed for their crimes, instead of living a long life on death row, the cost for incarcerating them years on end will also be eliminated.
All of that will in turn decrease the costs to investigate crimes and to catch and prosecute the recidivists through the system. Over time that will eliminate the need for some of the previously beefed up numbers of police, judges, courts, and prosecutors - further reducing costs. And these personnel reductions can be accomplished through attrition. As the crime rates and caseloads go down, we just don't replace retiring police, judges, and prosecutors, The decision whether to replace personnel or increase or reduce their numbers (through attrition) could be based on crime statistics.
The other costs to our citizens - both in terms of money and in terms of the physical and emotional damage - would also be reduced.
What we are doing is NOT working. With no fear of serious punishment, and better accommodations IN prison than many of them would have on the outside, crime continues to increase. It's WAY past time to try something different. Like maybe some of the things that worked to keep crime rates down in the past. Like the list above...