Prior to colonization Australia and South Africa seem to be similar. They are both similar in latitude and both had indigenous people living a hunter-gatherer lifestyle. During colonization, both areas had large population losses due to smallpox and other introduced diseases. So why is it that Australian is only 3% indigenous, but Black Africans make up about 80% of the population of South Africa?
Unlike Australian aboriginals, who led very primitive hunter-gatherer lifestyles, the Bantu peoples who lived in the Eastern part of South Africa (and who today make up the majority of the population) were farmers and herders. This meant that they could sustain much larger populations, and be less susceptible to dying from European diseases, than Aboriginal Australians. That's also the reason why Mexico has such a large native population compared to the US: their lifestyles could sustain much larger populations, and so many more people remained in Mexico even after depopulation from disease than in the US/Canada. And in fact, unlike the Eastern part of South Africa, the Cape was inhabited by hunter-gatherer Khoisan populations who were much more susceptible to disease than their Bantu relatives in the East, and as a result mixed-race Coloured people still make up the majority of the population in the Western Cape, with Bantu immigrants from the East making up the lion's share of the rest of the population, far outnumbering the native Khoisan population.
Also bear in mind that Blacks historically did not make up as large of the percentage of the South African population as they do today. During the Apartheid era, Blacks only made up around 2/3rds of the total population, with Whites, Coloured and Asians making up the remaining third, but higher fertility rates among Blacks combined with White Flight has substantially increased the proportion of Black people since then.