The price of clean water is at least an order of magnitude less than the price of electricity, but the cost of creating a water grid is probably more expensive than the electricity grid.
You will notice that many of the countries with unsafe tap water also have electricity reliability problems. If the economics of electricity don't work, then the economics of safe water don't work at all.
I don't think there's any conspiracy like this. It's just economic + (lack of) beauracracy. Installing and maintaining a functioning potable water supply across an entire country is expensive, but even harder is setting and maintaining standards.
https://en.wikipedia.org/wiki/File:Safe_drink_tap_water_map....
So basically it's only safe to drink tap water in western countries + Japan, Singapore, Chile, South Korea, and a few of the rich Arab countries.
I would argue that even the blue areas here would be speckled with lots of non-drinkable areas if you zoomed in, due to old lead piping and so on.