That's a strange group of countries to chose from! Canada, Australia, and New Zealand were all under explicit "nuclear umbrellas," for one thing (through NATO and SEATO), whereas South Africa was a pariah state. Their situations with regards to security and international relations are really not at all comparable, even if they share a colonial legacy (though even that is a pretty complicated comparison).
The reasons that South Africa developed nuclear weapons were very complex, as much about internal shifts in power as anything else. I have written a bit about this here, and you might also look at this response by /u/The_Alaskan.
While I had long known that South Africa developed nuclear weapons, I never really had thought about what they wanted to do with them until this year. /u/restricteddata answered my long-winded question about South African nuclear strategy here. (This is partly covered in /u/the_alaskan’s answer as well, I should hasten to add).