system
Given the following post, respond as if you're commenting on Reddit:
human
Stock market question NOT related to short selling

How does a company make money with stock resold on the market?

What I think I know.

Company Z decides to have an IPO (Initial Public Offering) and sell 100,000 shares of stock at $10.00 a share. Many people buy the stock and pay $10.00 a share. Company Z sells them all. Company Z now has $1,000,000 cash to grow Company Z. I bought 10 shares at $10.00 a share and gave Company Z $100.00.

If I sell my 10 shares to you for $15.00 a share, you give me $150.00. I recovered the $100.00 I gave Company Z, who still has the $100.00 I gave them. I also have $50.00 more.

To sum up;

1. I gave $100.00 to Company Z.
2. Company Z gave me 10 shares.
3. You gave me $150.00.
4. I gave you the 10 shares of Company Z I had.

Results;

1. Company Z has my $100.00.
2. I have your $150.00.
3. You have 10 shares of Company Z.

Company Z made zero money on the transaction between you and I. How does Company Z make money when their stock is traded on the market, if any? If they make zero money, why would they care what the value of the stock is after the IPO?

I have asked this question for decades to a wide variety of people and never received an answer I could understand. Thank you in advance.
gpt
Companies mostly make money from their operations. The stock market is for raising capital for expansion or investments. 

In your example, XYZ have made no money from the rising share price, however if they have opportunities to invest or expand, they could now sell new shares at $150 to new investors. This reduces the number of shares they have to sell for the same capital, which reduces dilution for existing shareholders. 

So the rising share price is a result of a successful business, but it's the shareholders that benefit from the higher share price.