Mark Forsyth said this quote

A bar, as any good dictionary will tell you, is a rod of wood or iron that can be used to fasten a gate. From this came the idea of a bar as any let or hindrance that can stop you going where you want to; specifically the bar in a pub or tavern is the bar-rier behind which is stored all the lovely intoxicating liquors that only the bar-man is allowed to lay is hands on without forking out.