As used in this article, "bail" is the release of a person who has been arrested and is being held in the custody of the State of Alabama or one of its subdivisions for the commission of a criminal offense. The primary purpose of bail is to procure the release of a person charged with an offense upon obtaining assurance, with or without security, of the defendant's future appearance in court.
Ala. Code § 15-13-102 (1975)