Incarceration is supposed to protect the upcoming trial, from the accused fleeing, tampering with evidence or witnesses.
It is not a punitive measure. Innocent until proven guilty, etc.
So while it's fair to criticise the disparate abilities to post bail, changing the system to incarcerate more rich accused would just be compounding injustice.
On the other hand, in the UK: "Under s. 4 of the Bail Act 1976, on each occasion that a person is brought before a court accused of an offence, or remanded after conviction for enquiries or a report, he must be granted bail without condition, if none of the exceptions to bail apply."