I find it strange tho. For a government hellbent on racial division and discrimination they worked with UNITA with no qualms...
It's not as black and white as that. Excuse the pun.
Remember that there were many black members of the SADF too, all volunteers and treated exactly the same as the white members. There was no apartheid in the military except that whites had to serve two years by law.
Angola was a hot theatre of the cold war with Russian empirical ambitions. Had the NP government co-operated with the Russians and SA became under their influence, apartheid would have been far worse and the Russians would never have used it as a weapon in the UN in their empirical ambitions to take SA and Namibia for their minerals. They needed cheap labour for the mines and farms and SA would have been a vassal state of the Soviet Union as the impoverished states of Eastern Europe were.
FAPLA (Angola MPLA) and PLAN (Namibia SWAPO) were the equivalent of the Ukranian Donetsk and Luhansk cannon fodder regiments of the Russian army chased into combat against the SADF and UNITA by the Cubans who were chased by the Russians.
UNITA was supported by SA as they were opposed to communism and were under the influence of the West.