Think about it.All the top military dudes in the early 1990s South Africa were white people due to the apartheid regime. They would have all the military know-how. How else could they have managed to dominate a majority population for decades?
If a serious civil war erupted in South Africa briefly after apartheid, the whites would win easily. If one erupts now, it is 50/50, but in the 90s, definitely the whites would have won.
In the 1990s white southafrica had fo options
1) stay in power , keep Mandela in prison but risk losing a civil war, risk having a more radical black leader, risk bloodshed and clashes against whites, risk another 20-30 years of guerilla erc
3) free Mandela because he was a reasonable guy , give power to black people,avoid civil war, survive without bloodshed, no sanctions etc.
THey chose option number 2) because they had high chances of losing civil war both from a political and military point of view