Coke, IBM, etc had to get out. They couldn't own the parts of their companies in SA. So they created new entities and sold them off, or just renamed them, took away the branding rights and sold their shares. The share values took a dive and people that couldn't afford such losses sold. Those that could afford to hold for 10 years bought up all the shares. Keep in mind, you could still buy a coke, it just wasn't branded as coke anymore, the companies still were open for business so much as they could without support from the U.S. entity.
When SA was allowed to take in U.S. investments again, Coke, IBM, etc bought back those entities. Some of the deals were a guaranteed buy back from the initial divestiture. So guess who reaped the rewards, who had the deep pockets to buy up all the shares? Yep, the old-moneyed white guys that the divestiture was supposed to hurt.
It all depends on what kind of politics are being played. Plenty of people in the U.S. supported divestment from South Africa because of apartheid, and would probably still do so if it still existed.