New York magazine offers an articulate look at how the criminal justice system's servants took the freedom, and ultimately the will to live, from a teen charged with a felony the government never bothered to bring to trial. The story is called "How All New Yorkers Killed Kalief Browder" and it's worth your time. If you don't live in New York, the bail statute is likely much more restrictive, increasing the probability that an accused will languish in jail for years.
I had a civil client I met in a Montgomery County jail whom I discovered had been in custody more than a year without trial. His last attorney had tried to get him a plea deal that the State liked, to improve his bid to obtain a job in the prosecutor's office. Other appointed counsel hadn't done much on his case because they weren't paid to prepare it for trial, they were paid to show up for court settings. Getting paid for something outside a scheduled setting took extra work, and was iffy. Whether the client did it or not, we should provide the same due process we'd like to receive ourselves – because the rule is there to protect not criminals we expect should lose, but to protect US when we're broke and wrongly accused.
If the law and its servants can't do that, they have failed.