Bail is a natural consequence of the innocent until proven guilty mindset that the US judicial system is based on. Wasting away in a holding cell until your trial for a crime that you may not even be guilty for because you were in the wrong place at the wrong time (again assuming innocence here) directly conflicts with that. Now obviously not everyone who gets arrested and released is going to stick around for their trial, and especially not if they know they’re guilty; they’re going to run away and hide first chance they get. The bail bond system prevents that several ways. First there’s a background check, and then you pay collateral (usually in the form of cash) that’ll be returned to you after you show up to your trial.
Now you’re probably thinking, “But what if I’m too poor to afford bail? Am I just fucked?” Well not yet because if you can’t afford bail then you can hire a bail bondman (or bond agent) to pay the bail for you at a cheaper cost (usually 10% of the original bond). In an ideal world you pay the bondsman 10% of your bail, they cover the rest, you go to court, the court returns the entire bail to bondman, and everyone goes home. But what if you decide to bilk you bondsman and skip town on your court date? Bad idea, because you’ve now just ripped off a person who no doubt has a lot of connections to federal bounty hunters and you’ll now have a warrant out for your arrest, and needless to say that the best bondsmen always have their clients in court one way or another.