I'm no investor or financial analyst, but it appears to me that Microsoft have a diverse range of revenue (that don't necessarily depend on each other) with pretty good lock-in with their products (not easy switching away from M365 once you've gone all-in with it). Apple on the other hand still have most of their revenue coming from iPhones with the next biggest coming from services which stems mostly from the iPhone sales. There's some lock-in with the iPhone, especially in the US, but it's pretty easy to switch from iPhone to Android and still have access to the same apps and services (apart from the Apple-specific iMessage/FaceTime). I don't know how much this affects stock prices, but it does seem like if you're investing in Apple, you're investing in the success of the iPhone. Obviously that's been a safe bet over the last 10 years, but nothing lasts forever.