Drug resistant TB is harboured in people who don't follow the guidelines for treatment and complete their OI drug courses correctly... HIV is the same - the difference is that HIV is not cureable at this stage and there are many more people on treatment at any point in time. SA patients have a poor history with adherence to medication - one of the most serious issues facing proper HIV treatment. As you can imagine - money wise - it is an issue as you cannot stop treatment once started. At around R1000 per month per person (very low compared to first world countries), government first line HIV treatment is costly. Once the virus becomes resistant to the meds (as in the case of a person who hasn't been adhering to their treatment), they move to the second line treatment at a cost of around R10 000 per month per person - not desireable (mainly because of non-generic patented drug costs). Of course if that person infects the next person or cross infects another HIV+ person, the resistant strain is passed on... Once government commits to treating a certain number of patients, that number will not go down.... so you can imagine the cost to the state when the number of second line patients increases... obviously I am not referring to the private patients.
Some of the reasons for non-adherence are side effects, challenges in keeping same daily schedule, sale of parts of the regimen for extra money (since HIV drugs are limited, not all HIV+ people can be funded by government and people sometimes sell their drugs to make extra money - of course taking part of the regimen and only taking it part time only makes the virus more resistant instead of supressing it, so you end up with two resistant people), etc. etc.
Bottom line is that this reflects very badly on the state of affairs in the SA health sector - especially public health.