2 points
apple offered huge discounts for students through their university, so many CS students got a macbook for super cheap and just never stepped out of the ecosystem.
This is the real reason. And I think they couple it with trying to make interface look and behave not how it is in Linux or Windows, so that once you’re used to it, you’re less comfortable switching to anything else.