bail (v.1) Look up bail at Dictionary.com
"to dip water out of," 1610s, from baile (n.) "small wooden bucket" (mid-14c.), from nautical Old French baille "bucket, pail," from Medieval Latin *baiula (aquae), literally "porter of water," from Latin baiulare "to bear a burden" (see bail (n.1)).

To bail out "leave suddenly" (intransitive) is recorded from 1930, originally of airplane pilots. Perhaps there is some influence from bail (v.2) "procure (someone's) release from prison." Related: Bailed; bailing.
bail (v.2) Look up bail at Dictionary.com
"to procure someone's release from arrest or imprisonment" (by posting bail), 1580s, from bail (n.1); usually with out. Related: Bailed; bailing.
bail (n.1) Look up bail at Dictionary.com
"bond money, security given to obtain the release of a prisoner," late 15c., a sense that apparently developed from that of "temporary release from jail" (into the custody of another, who gives security), recorded from early 15c. That evolved from earlier meaning "captivity, custody" (early 14c.). From Old French baillier "to control, to guard, deliver" (12c.), from Latin baiulare "to bear a burden," from baiulus "porter, carrier," which is of uncertain origin; perhaps a borrowing from Germanic and cognate with the root of English pack, or perhaps from Celtic. De Vaan writes that, in either case, "PIE origin seems unlikely." In late 18c. criminal slang, to give leg bail meant "to run away."
bail (n.2) Look up bail at Dictionary.com
"horizontal piece of wood in a cricket wicket," c. 1742, originally "a cross bar" of any sort (1570s), probably identical with Middle French bail "horizontal piece of wood affixed on two stakes," and with English bail "palisade wall, outer wall of a castle" (see bailey). From 1904 as the hinged bar which holds the paper against the platen of a typewriter.