They're not technically innocent. Nor are they technically guilty. Their status is in question.
And yes, the entire system is messed up. These people are being treated as definitely guilty when their status is in question. Sometimes for offenses that would not even require the level of incarceration they are at. You'll spend 15 months in jail awaiting trial for an offense that carries a 6 month maximum sentence. And even if they release you after 6 months because it would be cruel to incarcerate you "temporarily" for longer than the sentence to determine if you should even be incarcerated, it's not like you can get that 6 months back if you're not proven guilty. (Because the court doesn't prove you're innocent, just that it can't prove you're guilty, which is different.)
But your last sentence comes back around to the problem of there not being enough capacity for these people. ASAP could very well be a year and a half.
The system defers to assuming guilt because of fear. If you defer to assuming no guilt and you're wrong, you could be wrong in a very bad way. If you lock up an innocent man for 10 years, people will shake their heads and say "What a shame." If you let a murderer free while awaiting trial and they kill someone else, you are going to get absolutely fucked.
And while the chance of the second is pretty low, it's not a chance any of them want to take. It's Pascal wager, but for crime. And we know crime and criminals exist.