The primary reason a company offers public shares of its operation is to raise money. If you had a club, and you needed to raise money, you might have a raffle. People who wanted a chance to win something would buy a ticket in your raffle, and then hopefully you would sell enough tickets to raise more money than the prize cost.
Now imagine your club is really big and your prize is pretty cool. Someone comes along and buys your tickets, and then resells them for more than they paid. They are participating in the market and have assigned a value to those tickets based on perceived value, but your club only benefited from the original sale of the ticket. Your club may indirectly benefit, though, as the marketer might have created additional demand for your tickets. The market is a little like that, but a LOT more complex.