I thought even before Machel’s fatal plane crash, which by the way some suggest the Soviets engineered, he had turned his back on Marxism.
Neither Machel nor Neto were full blown, hard core communists as such.
This is the deal, back then, they just wanted to kick the Portuguese colonialists the heck out of their countries(Mozambique and Angola). They wanted independence. And the only countries that were ready and willing to supply them weapons of war (mostly for free) were the communist countries.
The Soviets wanted something in return for all the “help” they were giving.
After they'd kicked the Portuguese out, Neto brought in Cuban troops (with the help of the Soviets) when it appeared Apartheid South Africa was going to invade.
Sometimes, you do what you gotta do to get to where you want to go it, even if it means sleeping with the communists. Look where sleeping with the "devil" has gotten Kamala Harris.