Yes but the dozens of miles is moving water whereas the last few feet in you house is stale water.
Heated water is kept in a different reservoir and the piping uses heat resistant PVC.
In Brazil, most times the water has a smell of chlorine so I guess the chances of it having deadly/lethal microbia there are next to null?
Drank water from the tap (where plumbing is done properly) for all my life, never had any problems so far.