That’s horrific, and the actual sentence was 6 months+ time served or you ended up winning at trial? Is it bec only US citizens are protected by the constitution’s promise of a speedy trial?
This is very common in the US justice system. There's a general institutional apathy or sometimes even vindictiveness that causes random delays to get to trial. If you don't have the money for bond, don't have someone to pay, or a bondsman wont cover you, you just stay in jail.
Every year multiple people die in prison from preventable causes without ever being sentenced.
This is why bail reform is important. A well-off person can pay-away the bond and prepare to defend themselves. A poor person will be stuck, lose their job, home, important documents, pets, etc all before being found guilty. If they're found not-guilty, its simply their fault for being poor or being in the wrong place at the wrong time and there's zero recourse for these people having their life basically lit ablaze. Please don't take the anti-bail reform propaganda at face value, for every terrible outlier case, there are hundreds of people who don't have their life grenaded over a small charge.
Making people desperate is an easy way to increase crime.