Question: why did gaol become jail?
Answer: Because Middle English (the language spoken from about 1100 to 1500) adopted two distinct versions of the word from French. The “gaol” version comes from the Norman French gaiole or gaole, the OED says, while “jail” comes from the Old Parisian French jaiole or jaile.