People flock to America even though it's extremely racist compared to many of the alternatives. Racism isn't the only factor a lot of people are using, they have to pick from a lot of suboptimal options in a country with high crime and rolling blackouts and play whatever cards they have. It does seem like they found a model that is working on other qualities better than many other parts of South Africa. I wouldn't write them off just because they're ethnically segregated.
I'd also point out I used "private towns like" so it could refer to some other perhaps less racist private town, just not sure what that is. If you are Afrikaners it looks like an underutilized option. It would be nice though if there were less segregated options as well.