Apple lawfully licensed technology from the Xerox PARC from Xerox. Xerox knew they were licensing the technology, with the likely objective of copying it. That's a substantial difference with respect to what Microsoft did.
Xerox's decision is considered dumb, but they were told exactly what was going to be done. The executives were stupid enough to agree because they did not want to hear about anything other than photocopiers and toners.
Microsoft on the other hand was initially a close Apple partner, developing the Z-80 SoftCard for Apple II and then helping develop applications for the Macintosh. Once they gained enough trust, they used that trust to clone the Macintosh (Windows 1.0).