The origin of the word loo, meaning lavatory, are still undecided but there are three theories which are possible contenders.
The first, and perhaps most popular idea is that it comes from the French term gardez l’eau, which basically means ‘watch out for the water’. Supposedly, medieval Brits would shout this out the window to warn passers-by as they emptied their chamber pots out onto the street. The term then evolved into gardyloo which, so the story has it, then became loo. Unfortunately, loo was not recorded until after gardyloo became obsolete. So the chances for this theory being the right one are looking slim.
The second theory also comes from French with the word le lieu, literally meaning ‘the place’ which might have been used as a polite euphemism. But again, we don’t have any written documents to support it.
The final, most likely option is that it comes from Waterloo. This would have also been a polite euphemism which was later clipped. According to the OED, Waterloo was clearly stamped on the cisterns of many British privies in the 1900s. Although the evidence for this idea is still pretty lacking, the fact that Waterloo has the added similarity to water closet makes it seem the most believable.