There are a lot of reasons why people don't leave. Poverty, if they do have money, it is hard to get it out of the country due to exchange restrictions set by the reserve bank. Also, you have to be able to immigrate somewhere. My brother in-law waited 12 years to get a green card (my wife is from South Africa and applied for him). I have lived there and never had any issues. Johannesburg is much worse than other areas, no different than Detroit or bad areas of NYC, Chicago or LA.
The police are worthless, they won't show up. Everyone has ADT or another security company, I have even seen an ADT panic button in the police station.
Spent over 2 weeks there in February and it was great. It used to be a great place to live, now it is a great place to visit. We drove around some of Johannesburg at night, it was a little sketchy and we were not in a bad area.