The English word for chaos is the name of the town where Jesus was born. Bedlam is how Londoners said "Bethlehem," and the Bethlehem they meant was a hospital.

In 1247 a priory was founded in Bishopsgate, just outside the walls of London. It belonged to the New Order of St Mary of Bethlehem. Wikipedia credits its founding to Goffredo de Prefetti, a bishop-elect, with funding from the alderman Simon FitzMary. Over time it turned from a religious house into a hospital. The first record of mentally ill residents dates from 1403, when six men described as mente capti, "insane," were living there.

People did not say the full name. Bethlehem shrank to Bethlem, and in quick speech Bethlem became Bedlem. Etymonline finds the spelling Bedlem in a will from 1418. When the monasteries were dissolved in the 1500s, the hospital survived as a civic asylum.

The name moved from the building to what happened inside it. For much of the 1700s the hospital let paying visitors in to look at the patients. Wikipedia reports it raised between £300 and £350 a year this way until the practice was curtailed in 1770. To outsiders, Bedlam meant noise, disorder and spectacle.

Etymonline dates the general sense, "a scene of mad confusion," to the 1660s. John Davies of Hereford titled a 1617 book of epigrams Wits Bedlam, still using the name for the madhouse. The word bedlamite, for an insane person, appeared in the 1620s.

The hospital itself never closed. It moved to Moorfields in 1676, to Southwark in 1815, and to Monks Orchard, on the edge of Croydon in south London, in 1930. It is still there as the Bethlem Royal Hospital, part of the NHS. The word bedlam has long since stopped referring to it. Most people who use it have no idea a real place is behind it.

The chain of names reaches back further than London. Bethlehem in Hebrew is Bet Leḥem, literally "house of bread" or "house of food." In Arabic, Bayt Lahm is read as "house of meat." So the word for pandemonium began, three languages back, as a quiet name for a place to eat.