Building codes have been around for a while, going back to Hammurabi in 1750 BC. The Book of Deuteronomy specified that houses should have parapets to keep roofing tiles from falling on people's heads in the streets below. Their purpose was and mostly still is, to keep people safe. Plumbing codes serve much the same purpose; when water and sewers were installed in cities 150 years ago, people had to be compelled legally to connect, but it was necessary for public health.
Today, many people want to disconnect, to get off the grid and the pipe. In Cape Coral, Florida, Robin Speronis was doing just that, using solar panels for electricity and rainwater instead of city water. That's illegal under the building codes in Cape Coral, so they charged her, or as Off-Grid Living dramatically titles it, City threatens widow with eviction for living off the grid.
In court, the magistrate issued a confusing ruling, telling her that she must connect to the city but doesn't have to actually use it. Capturing the state of things today, Off-Grid living writes:
“Reasonableness and code requirements don’t always go hand-in-hand … given societal and technical changes (that) requires review of code ordinances,” [Magistrate] Eskin was quoted as saying. Eskin’s remarks indicate that he views the code as both obsolete and unreasonable and in need of change. Yet he felt he had to enforce it.
Why we have municipal water supplies
Since the days of Dr. Snow in London, delivery of safe municipal water has been one of the core functions of civic government, it's raison d'être. There were excellent reasons to make it the law that people connect, for public safety. Cape Coral isn't exactly London in terms of density. In fact, after being hammered in the real estate crash, it's pretty empty. But the rules were made for a reason. And while drinking rainwater is generally safe, you don't want to pick it up from your gutters after running over your roof that's dirty from pollution and bird droppings. It has to be done carefully.
Building code vs The Bullitt Building
It's a complicated issue that a lot of people are trying to deal with at different scales. In the Bullitt Building in Seattle, it is a requirement of the Living Building Challenge that they meet their water needs through rainwater capture. But the City made them hook up to municipal supplies until they could prove it was safe. Then Federal law said it had the water had to be chlorinated, even though Chlorine is on the red list of prohibited chemicals. So they have to collect the water, chlorinate it, and then dechlorinate it so that it can be used. It's expensive, complicated and silly. It is also in a building used by the public, not a single family house.
Ayn Rand vs John Snow
There is the libertarian point of view expressed in comments at Off-Grid living that what a person does in their own home is their own business (and that the International Plumbing Code is an UN Agenda 21 plot) and there is the public health point of view that is proud of the fact that our cities for the most part now deliver safe, tested, potable water to its citizens, who should be using it instead of untested and unreliable sources. Then there is the realization that times have changed, that there are filtering and management technologies that make it perfectly safe to go off-pipe, and it should be promoted. What do you think?