Logically a companies stock price might reflect the amount of money a stock holder would expect to get back from owning the stock. If Microsoft were to return every last penny of profit to its stock holders today, and it returns less than a third of its profits now so that will have to change, and somehow continued to earn $35 billion a quarter, and people wanted to earn their money back while holding the stock in 20 years, Microsoft would be worth $2.8 trillion.
That gives you the timeline for doubling your money, assuming the stock is worth the same amount of $ you put in as at the start. If you put the same money into a high yield savings account you'd more than double your money in the same amount of time. Based purely on this people with math skills would put money in the savings account even if Microsoft suddenly gave away all its profits to stockholders, as they'd still earn more money from the savings account.
But Microsoft is worth 11% more than putting your money into a highly safe investment like a high yield savings account, if Microsoft were literally to give all of its money away every quarter for the next 20 years, which they will not. At least it's worth more according to "the market". Why? Well Microsoft's quarterly earning line went up steeper than "the market" expected it to. Which means people now hope that this line will go up steeper again next time over the last time it went higher steeper than people expected it to. And... that's it. Literally that's what "the market" is reacting to, the attention span and math skills of an upper middling third grader with attention span problems. Nevermind that, based on current dividends, Microsoft would need revenues the size of Switzerland to match a high yield savings account in return on investment. The line went steeper, that's what matters!