This doesn't represent the companies' revenue, profits or marketshare. However, it is symbolic of the companies' changing fortunes and strategies. For Apple, it's a recognition that the company's days of runaway growth might be over. Its market cap has fallen from over $1 trillion in the summer to the $800 billion range through both larger market forces (such as economic uncertainty due to tariffs) as well as concerns about Apple's own performance. The company is grappling with a heavily saturated smartphone market, and is focusing more on the profit it makes from iPhones than the number of units it sells. It recently warned that it might not meet analyst estimates, and it has increased its reliance on services like Apple Music as well as iPhone-friendly accessories like the Apple Watch.
Microsoft, meanwhile, has been on the rise as it changes its own strategy. While PC sales are still struggling, the company isn't as dependent on Windows as it was in 2010. It's thriving on cloud services like Azure and Office 365, not to mention its growing gaming business. Simply put, Microsoft has learned a lot from its past mistakes and is growing in areas that are still red hot -- and investors are pouring their cash into the company as a result.