1300-50; (noun) Middle Englishretret < Old French, variant of retrait, noun use of past participle of retraire to draw back < Latinretrahere (re-re- + trahere to draw; see retract1); (v.) late Middle Englishretreten < Middle Frenchretraitier < Latinretractāre to retract2
c.1300, from O.Fr. retret, noun use of pp. of retrere "draw back," from L. retrahere "draw back," from re- "back" + trahere "to draw" (see tract (1)). Meaning "place of seclusion" is from 1423; sense of "establishment for mentally ill persons" is from 1797. The verb is first attested 1422.
beat a hasty retreat. Reverse course or withdraw, usually quickly. For example, I really don't want to run into Jeff—let's beat a retreat. This term originally (1300s) referred to the military practice of sounding drums to call back troops. Today it is used only figuratively, as in the example above.