According to Rowling “when Hogwarts’ plumbing became more elaborate in the eighteenth century (this was a rare instance of wizards copying Muggles, because hitherto they simply relieved themselves wherever they stood, and vanished the evidence), the entrance to the Chamber was threatened, being located on the site of a proposed bathroom.”
Source: latimes.com – Los Angeles Times