That is literally the entire point of shares. You buy a percentage of the company and give them money so they can use that money to expand and develop.
Why would I give a company money if I don't get a percentage of that company? It's not a fuckin donation.