When an employee works at Microsoft he creates value. He didn't have that value before he did the work, he created it through the work done there.
Microsoft pays him a salary in return for his value.
However, the salary Microsoft pays does not match the full value he created. The difference is Microsoft's profits. The company is taking those profits from the workers who created the value in the first place. They didn't have that value when they joined, they created it there, but it's still taken from them at time of creation.
Those shares represent a right to a share of those profits. Stock shares literally represent a right to the excess value taken from the workers who created it.
So who did Bill Gates take that money from? The workers who created the value the money represents.
And this is how you wind up with massive wealth inequality and all the problems that creates.
People recognize the problems with wealth inequality. The recognize the problems with unions (which have their own power problems and corruption problems). They recognize the problem with having the government redistribute the wealth (which is still better than allowing the inequality to continue to grow).
But we're so ingrained with the idea that the way things are is the way they should be that we rarely talk about a pretty obvious solution - let those who generate the wealth have democratic control over what happens to it at the time of generation.