I did the academic thing for a bit. For non-in-demand work, it's a really great alternative to industry. You get to teach, do research, write papers, and get completely involved in the world of academics, while simultaneously being payed pretty damn well in comparison to industry.
For in-demand work (so, CS, engineering, applied maths/stats, or even pivots such as physicists to finance), academia doesn't completely fall short of local industry. With a PhD you typically get to R~800k-ish as a Senior Lecturer as soon as you graduate (straight "Lecturer" is usually the pre-PhD entry point).
It is pretty hard to become an Associate Professor though (tenure), and a full professor. Many never get beyond Senior Lecturer, and many get stuck at Associate Professor. The factors involved in promotion here are numerous:
1) Research record
2) Teaching record
3) Internal University Politics (popularity, reputation, committee memberships, admin responsibilities, etc.)
4) External Politics (AA, BEE, etc.)
Many people become full time teachers, and their research goes out the window, which inhibits their promotions. Others focus only on research, which if very successful can dominate a lack of teaching, but only just.
Another consideration is that often "Professor" becomes a largely administrative job, and if (1) and (2), is what got you into the whole thing, managing a lab of mass MSc and PhD students, while coordinating undergaduate programmes, may not be for you either. As an FYI, other jobs such as Dean of Faculty, and Head of Department are really just code for "More Admin". Also, HoD isn't necessarily a permanent position, but a title that one holds for a few years and then gives to someone else (usually it comes with a temporary pay bump too, while held).
As others' have said, there is often a certain amount of time allowed for external consulting, or managing of founded spin-off companies. In practice, most academics just don't have time for this, or if they do, the academic side of their career tends to suffer. I have very ever rarely seen this well balanced.
Yet another other consideration is that although it is very noble for an academic who could work as an academic internationally, to choose to work in SA, most don't - academics want to work in the best universities, and best labs around the world. Better facilities, famous colleagues, access to conferences, collaborating with world leaders in their field, etc. is typically the primary desire of any research focused academic. This also means that many of your SA based colleagues are going to be pretty meh (with the exception of some very bright individuals who have chosen to stay in SA for personal reasons at the expense of their careers).
Another thing that also pulls academics out of universities is actually industrial research positions. Many tech and finance companies have exclusive research divisions, which focus on slightly more targeted research, but still allow paper publications, and collaboration with other universities or research labs. These are often the most sought after positions, offering several times the compensation of university academic positions, while typically also having no teaching responsibilities at all. Usually to get in one has to be the brightest of PhD graduates or postdocs, or a well established professor who would would sometimes retain their academic title, and be responsible for a cross industry-academia research collaboration.
Apart from the academic pulls above, there are plenty of non-academic research or research-and-development jobs overseas that would get the best PhDs from STEM. It's hard to consider going for an R800k/y starting salary, when there are R3-4.5m/y starter jobs out there, overseas. On top of that, the typical Senior Lecturer would only have 2 promotion steps ahead of them with minor pay bumps, which would typically take 5-10 years for Associate Professor and another 10-20 years for full professor, while industry has the potential to go way higher, way faster.
A final point is also that not all academic positions in SA offer the same salaries as SUN, UCT, WITS, etc., and due to the prestige, salary, desire to do academic work, etc., there is a lot of competition for these roles.