The biggest problem is plea bargaining. Criminals rarely, if ever, do the time for the actual crime they committed. I spent 25 years working in uniform in NY State prisons. Incarceration is supposed to be part of the punishment, but there’s no punishment when you can murder someone, plead guilty to a lesser charge, and be out in a few years. And while you’re doing your reduced time, you can hang with your homies, get packages from home, money, and visits, and whatever else you can extort from some weak convict.
Inmates can run their criminal enterprises from inside the walls too, affecting many people on the outside.