Java applets distributed via the web (executed by Netscape Navigator) had the potential to displace Win32 as a preferred API, thus making Linux and other OS's able to compete with Windows in terms of application offering.
Some OEMs wanted to sell Windows computers with Netscape Navigator preinstalled, because it was way better. Microsoft told them they wouldn't sell them any Windows license at all if they did it, forcing their hand.
Microsoft further preinstalled their own incompatible version of Java, to try and make Java apps non cross-platform. They did the same with Internet Explorer's own incompatible version of web standards, when web apps started to gain popularity.
Windows' monopoly was maintained in part by Microsoft purposefully spending resources in actions that only harmed Windows users (and consumers in general).