How the Justice System Works: A Report
If you think about it, it is inherently implausible that the state could be an effective administrator of justice, for which there is a supply and demand like any other good. Shortages, inefficiencies, arbitrariness, and underlying chaos all around are going to be inherent in the attempt.
Because we are dealing here with the meting out of coercion, we can add that inhumane treatment and outright cruelty are also likely to be an inherent part of the system.