1) Their climate sucks 2) They have very little arable land and lack water 3) Production of electricity is expensive 4) A lot of interior cities - not a lot of port access
So, from a geographical perspective, what is SA supposed to produce that gives them a comparative advantage against the rest of the world? Then you move into the political/religious aspects:
1) Uneducated workforce, despite offering scholarships to study abroad for every one of their citizens 2) They import most of their labor from other countries, ergo, their labor costs are higher with respect to the rest of the world. A factory in India will be cheaper than a factory in SA, all else being equal.
These disadvantages make the only real route to a viable economy a service-based one. This is what Dubai has done - Dubai has done their damndest to establish free trade zones, a legal framework, and a tax regime to get companies to establish their MENA HQ's there (and they've done so accordingly). SA is WAY behind on this (I would argue irrecoverably behind).