In South Africa I would be very surprised if that ever happened. This is a country that went from exporting electricity to daily blackouts because of corruption.
Although your claim is literally untrue as the grid has been upgraded, the answer is: mostly the apartheid government. They left the ANC with a grid that served only 10% of the population, which makes it very difficult to upgrade, especially in a country with rampant poverty leading to cable theft, corruption, and general lack of infrastructure.