1530s, from a-
(1) + M.E. loof "weather gage," also "windward direction," probably from Du. loef (M.Du. lof) "the weather side of a ship." Originally a nautical order to keep the ship's head to the wind, thus to stay clear of a lee-shore or some other quarter, hence the fig.