I'm asking this out of pure ignorance of any history of Africa except that much of Africa was colonized by Europeans at some point.
The truth is, there aren't very many white people in South Africa. They are a minority population, but sure, there are more whites in South Africa than most other African countries.
Basically it's because the colony wasn't set up as just an extraction point for resources. The diamond mines in SA weren't discovered until much later in its history.
The Cape Town Colony was originally established as a way point by the Dutch for sailors traveling to the Spice Islands in the east. When the colony was founded it wasn't set up for extraction (like colonies along the Gold Cost, the Ivory Cost or the Slave Cost), but rather for settlement. This was more conducive to larger population settlement than just a token population to oversee extractive purposes. Diseases like malaria were also less prevalent in southern Africa which made settlement by Europeans easier. Check out 'Why Nations Fail' by Daron Acemoglu for a discussion about what determines what countries were colonized for extractive/settlement purposes if you're interested.
The reason that you didn't just have a concentration of white settlers on the coast came about as a result of conflict between the handover of the colony from Dutch to British hands, forcing the Dutch farmers (Boers) to move inward into the country to avoid some of the British laws that they didn't approve of (including banning slavery). This was known as the Great Trek (or Voortrek I believe). This helped dissipate the white African population throughout the country.