The difference is that Apple is selling hardware with software as a single product and has done so consistently, while Microsoft attempted to exclude a new competitor by colluding with OEMs and imposing exclusionary agreements on partners as a condition of buying Windows, a product that had a dominant share in its market. If Microsoft had always included Internet Explorer in Windows and hadn't tried to later tie them together in order to crush Netscape then the outcome may have been different. Instead, Microsoft basically said "distribute our new product or we won't let you distribute Windows" and you just can't do that when Windows is dominant.
The Justice Department's complaint is an eye-opening view into what Microsoft's misconduct was: https://www.justice.gov/atr/complaint-us-v-microsoft-corp