Much of the plumbing work in populated areas is regulated by government or quasi-government agencies due to the direct impact on the public's health, safety, and welfare. Plumbing installation and repair work on residences and other buildings generally must be done according to plumbing and building codes to protect the inhabitants of the buildings and to ensure safe, quality construction to future buyers. If permits are required for work, plumbing contractors typically secure them from the authorities on behalf of home or building owners.
Those who attempted to bring plumbing indoors faced technical as well as attitudinal challenges. Decisions on how wastewater was removed required as much concern as those made to ensure an adequate water supply. But equally vexing was the prevailing miasma theory of disease, which held that illnesses stemmed from "bad air" that was readily identifiable by its offensive odor. This led to a distrust of early indoor plumbing that tended to leak and a deadly fear of the sewer gas that accompanied the leaks. It is no wonder then that many individuals maintained a strong belief that elimination was best taken care of out of doors.