Most cities live and die on their sewage scheme; so does the surrounding environment. The system represents a huge investment of water, sometimes on the level of millions of gallons of water a year. All of that water has to have somewhere to go, and for most cities that is straight to the local aquifer or the nearest ocean. This makes a certain degree of sense as most cities were founded where there was a major source of water originally for drinking and commerce, but that water became even more important as more uses were found for it. As such it is the most important systems to set up.
Originally, most cities did not have any actual sewage system for dealing with sewage. Sewage was flung out a window, collected, and deposited outside the city. If there was a castle with a moat, the waste was eventually dumped into the moat. Eventually city planners started planning for waste disposal and utilized streams and rivers to help clean out the system. Combined with the advent of running water and all of that waste was sent out of the city and into the local rivers. Eventually the human waste was joined by various pollutants, such as car oil, paint, fertilizer, and worse creating a major problem.
It is important to note that there are two problems: human waste and pollutants. Human waste, if untreated, causes death in local systems by increasing growth of microbes and algae in waterways. Eventually that growth hits a point where it overwhelms other flora and fauna and chokes it out, and then ends up killing itself later. Suffice to say that diseases can also be incubated in those waters as well. This is why human sewage needs to treated before allowing it back into rivers and aquifers.
Pollutants are more difficult to deal with and require more of three-pronged approach. Most cities encourage recycling of what can be recycled and proper disposal of everything else. Also, any sewer lines that lead directly to rivers and oceans are plainly marked in order to prevent pollutants going to them. Lastly, police enforce the rules, ticketing those they catch dumping pollutants into the sewers. By pointing out that there is a potential problem, providing a way to dispose of those problems, and then punishing those who do not get rid of their problems correctly most municipalities attempt to curb the pollution problem.
This is obviously not to say that there is not an issue. Plenty of people get into a rush and forget to dispose of pollutants properly just as others dispose of paint without thinking it all the way through. It does not help that some dispose of paint and such in the regular trash without realizing that that does not really help the situation. However, as more people become aware of the problem and worry about the environment more, that is likely to change over time and lead to a much better future for all of us.