system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does money grow by 10% in the stock market every year? Where does that 10% come from?

I tried asking on eli5 but the post was removed because of "similar posts." I had also been looking at other posters when it was removed and didn't feel satisfied by any of the questions or answers I saw because they didn't talk about the time value of money assuming 10% year over year returns on investment.

Ok so I heard the S&P500 has grown by around 10% every year since its inception. Ignoring market massive bull runs and crashes, let's just assume it's always steady. That means that in 7 years your money doubles. There's also inflation and taxes but we can account for that and still get (i dunno) 7% returns. The cost of goods or inflation isn't keeping up with that 7%. So where does that money come from?

Like imagine a small island called worldsville with a population of 100 people. There are only 5 big companies on the island: Arnold's Apples, Wes's windows, Fecilia's books, Ema's delivery service, and Giggle's joke emporium. Everyone on the island starts with $100 or islandbux. But after 30 years money invested into stocks of the island's companies would balloon to $1600 dollars. But the price of goods has only gone up 2x due to inflation. So is everyone who invested just over 8x richer (not accounting for taxes)?  

(They can buy 8 apples in 30 years whereas they could only by 1 today).  

I've heard this difference can be explained by improvements in productivity meaning that Wes's apples can only increase 2x because he planted more trees and can produce more of them. But this can't continue forever, there's a limit to how many apples people can eat. And it's hard to believe his company has become 8x more productive. Try as much as you want to improve the rate you run, you can't run 8x faster than your maximium speed today.

Except for things like island housing and island college tuition and healthcare which have risen with the increase in stock valuations, does the cost of goods just become smaller relative to wealth? And if so how is that sustainable?

Ok so here's a more concrete example. A yacht is worth 8.4 million dollars today. Let's say you have 1 million in your portfolio today. You can't buy a yacht today. In 30 years let's say that a future yacht is worth 16 million, and your portfolio is also worth 16 million. You can buy a yacht then. All you did was click one button "buy VTI" on your robinhood account. How is this sustainable? Is everyone just going to be able to own Yachts?
gpt
The returns come from capital growth and from profits. The shareholders are owners of the business. Each share is a share of the whole firm, a slice of it. So, when the firm makes a profit they own that profit too. Similarly, when the firm grows the share of the firms that each share represents grows too.

A firm can pay profits to it's shareholders in various ways. It can issue dividends, it can buyback stock. It can also reinvest the profits in growth. If that reinvestment creates growth then it increases the price of the shares for that reason, as discussed above.

As you mention yourself, inflation also increases the price of shares. But to get the real growth we have to subtract inflation. As you say that gives, ~7% in real terms per year. That percentage is a fairly consensus estimate for long-run returns to the US stock market.