Why aren't there universal sockets in every country?Balaji Viswanathan:
While the Americans developed the power delivery systems and the modern electric plug, other countries didn’t find the American standards—60 Hz, 110V, and their plug system—as efficient.
Thus, on their own, each country started improving on what they thought was an inefficient way to deliver electricity. Germans liked the 50Hz (which fit nicely with the metric system) and 220V (which provided more efficient power transmission) much better. Englishmen improved upon on the American plug with a much safer (and bulkier) plug.
Unfortunately for the Indians and Pakistanis, their innovation came after they left India in 1947, leaving the subcontinent in the older English standards and the English in newer plug standard. England and Europe don’t talk very much, and thus Europe didn’t adopt the English standard either.
Before that the world wars came in and pushed back all talks of standardization: "Oh you want to use the plug system of the Germans? No way."
Then there were the unique ways in which electricity was delivered and charged. For a long time, Italy had different systems for delivering electricity for bulbs versus non-illumination use. They just developed their own plug system to work with that requirement. Thus, each system of plugs had their own advantages suitable for their system and countries didn’t accept one system to be better than another.
Once you have picked one system of electric plugs, it is not easy to switch (no pun intended) to another. You need to rip apart all the wall sockets in every home, office, and factory, and also change stuff in your electrical appliance production. You need to do it all at once to prevent accidents and that will be very painful and expensive. That shock (again, no pun intended) and pain is not usually worth it. Most countries found that there weren't that many travelers who wanted to carry their electrical equipment around—why would you take your microwave oven or TV during your travels?—while there are easier workarounds for charging electronic equipment through USB standards. Thus, there is not really a push to accept the global standards (the Type N plug).
In summary, every country evolved its own system in parallel to replace what they thought was an inefficient American system and by the time they talked to each other there were two world wars, pushing out all talks of standardization. By the end of World War II, electricity was ubiquitous and it was very painful to switch to a common standard and there was very little demand for such a switch.