Their gains, we also saw, come from their ownership of the shares.
In other words, their part ownership of the firm, represented by the stock, allows them to accumulate financial claims on wealth they did not generate.
Some would object that successful investors deserve those gains, even if they don't contribute to the productive process. It's a matter of morality: they are like the virtuous ant in the ant and the grasshopper tale.
Let's add another, related, objection: it takes an analytical mind to pick a winner in the stock market; there are risks involved, too; successful investors must be real smart.
This last objection is arbitrary and as likely to be true as it is to be false. Maybe these successful investors were just lucky, buying into AAPL (as exemplified in the previous post) because the name was pretty. Sometimes people, even exceedingly moral ones, like investors, get insider information. Then they put their holding inside a safe and forgot about it; or maybe just fell into a coma.
Research has found no evidence that investors systematically outperform the market. At most something like:
"(...) Results suggest that the pros selection statistically outperforms the random selection only in the one-week period. Over a six-month holding period, the random stocks perform better than the pros recommendations". And that possibly because of a kind of "self-fulfilling prophecy": a respected advisor recommends a stock, investors buy into it, making the price go up.
Regardless, for the sake of the argument, let's assume our friend Fred is a true "market visionary", who heroically saved money, penny by penny, and invested it in AAPL at great personal risk. Doesn't he deserve his gains, even if he did not generate the wealth he claims?
Foxconn assembly line workers are paid to assemble machines; not for their personal virtues: no bonuses for playing the clarinet, being nice or smarter than Odysseus. Apple Inc. designers are paid for their designs; computer programmers, for the software they write. No morality considerations are sufficient to change this 
They all contribute to their employer's bottom line and that's why they get paid. No morality considerations are necessary: if they are not paid, workers stop producing, the firm stops selling and there is no money to pay suppliers, taxes and dividends. Workers generate their own pay, plus a lot more.
"Ah!" - the free-market believer says - "Governments, too, extract money from the firm, as taxes. But they don't contribute to the productive process. Why don't lefties denounce this?" It's questionable that governments aren't functional for capitalists; but to argue why would take us far from the subject.  So, it's easier to assume it: "You are right. Governments are parasites and do not contribute in any way to the productive process".
As we saw last time, shareholders (Fred among them) contributed nothing at all to Apple's performance, and legally extracted money from it. If I were a free-market faithful I'd find it difficult to differentiate a shareholder from the Government in this sense.
Let's look at this from another perspective. If the reader is a shareholder (say, an Apple Inc. shareholder), try the same thought experiment: write Tim Cook a forceful letter demanding higher dividends for you, because you are really nice, a good clarinet player or smarter than Odysseus. At best Apple's CEO's reaction would be something like: "Good for you! So what?"
That answer would sum up the notion that for Apple Inc. Fred's morality-based claims are as irrelevant as his age, religion, height, wisdom, beauty, or musical tastes. After all, firms, too, own shares and firms have no virtues.
Careful readers may have noticed the adjectives "sufficient" and "necessary" used above: morality and
I'll try next the last common objection I've heard: Small shareholders (like Fred) don't control the firm. Big shareholders do; their momentous decisions on crucial matters, that's what creates wealth!
Readers are invited at all times to submit their questions, to offer their own original objections and comments. Please, however, check the Comments page before posting.
 Liang, Youguo; Sanjay Ramchander and Jandhyala L. Sharma (1995). The Performance of Stocks: Professional versus Dartboard Picks. Journal of Financial and Strategic Decisions. Volume 8 Number 1 Spring 1995
 Skeptical readers may try the following thought experiment: demand a pay raise forcefully from your boss because you are really nice or a good clarinet player. DISCLAIMER: if you do this in real life (which I don't recommend), you assume all responsibility for your losses.
 "Adam Smith: the Retcon?" hints towards the real contribution of the State to capitalism.