>>2527900It's a combination of cleaner water and resistance to the local microbiota of the water.
Hunter-gatherers and early farmers/pastoralists benefited from low population density. Water-born pathogens from human shit weren't nearly as common as today.
Also, people can gradually develop resistance to the bacteria in the water around their home. I saw this in Cameroon; people who travelled to different areas for a short time would bring water with them to avoid diarrhea as an "allergic" reaction. I've also heard of Mexicans getting diarrhea when they come to the U.S. for the same reason, despite our cleaner water.