MS invested in Apple to keep them afloat so they had a competitor and avoid anti-trust lawsuits.
That seems more nefarious than buying products from each other. Either way it worked out fine for Apple.