Approach A: If I own 100% I would clearly get 100% of all future profits. If I owned 50% (ie, if this was a joint venture between me and my friend Joe), then...I'd have a claim to 50% of all future profits. By extension, X% of ownership gives a claim to X% of the future profits. Your share of Amazon may be tiny, but if someone wanted to buy Amazon outright, they'd need to buy your share; the value of that share to the potential buyer is proportional to the value of Amazon as a whole.
Approach B: Every dollar of profit that Amazon makes is either paid out in dividends, or is retained and re-invested in order to garner future profits. The same is true for future profits. However, all things are finite, so at some point the company will be wound up and liquidated; any profits that have not been disbursed to shareholders via dividends will be disbursed at this time. Ergo, every dollar of profit is eventually disbursed to shareholders.
(Ah, you say, but it might be a decade or more before Amazon pays dividends or is wound up. But when you go to sell your shares, the same analysis holds, recursively. Your share of Amazon has value because you can sell it to someone who will buy it because they can sell it to someone who will buy it because [...] they want a share of Amazon's future dividends.)
Or to put it another way: A company has assets and liabilities; if you net these out (ie, sell off all the assets and pay off all the liabilities) you get a "book value". But a company almost always is valued at well above its book value: Amazon at 17 times book value. In other words, it would cost you 17 times more to buy Amazon than it would to just build an exact replica of all their warehouses and infrastructure (and patents, and brand awareness, and goodwill, etc.). Why? What do you buy when you launch a hostile takeover of Amazon other than all those assets? Answer: Their future profits. That's the only thing left to have value.
When they decide to forgo paying dividends, that money is usually put to other uses by investing it (case Amazon) or stockpiled in cash (case Apple).
In both cases the value of your 0.0001% slice has increased, and even though you won't get an instant transfer of that value, you will see it in the appreciation in the market price of your slice.
That totally makes sense for stocks that pay dividends, but how do you claim your 0.0001% of profits for stocks that don't?