Bail is one of those things that's just sort of sensible unless you actually want to be keeping every person who gets arrested locked up, at great cost, until trial, which can be and usually is months away.
I'd have been very surprised if it were common law only.
As an aside, people accused of petty crimes (misdemeanors, gross misdemeanors) who are unable to afford bail where I live have an enormously high rate of taking plea bargains to get their butts out of jail sooner rather than later. The alternative is for them to serve what is likely to be the whole sentence while awaiting trial, meaning that the trial boils down to a question of whether the incarceration was just or whether it was mildly unfortunate.
Unless conviction will get you deported, there's usually not much reason to stick it out, guilty or innocent.