@FourSevenTwo - I think the way to look at it is that you are not getting money “for nothing”. You are letting companies, perhaps hundreds of companies, use your money to operate and to grow.
The companies that succeed will be able to pay their directors and employees in return for their time, skill and labour, and they will also pay you for trusting them and letting them use your money.
Sometimes a company might do really well, so much so that as it rapidly grows, the value of your stake in that company will grow rapidly too. But even if a company isn’t necessarily always able to keep growing it may still be run sensibly and be able to generate a profit, year after year. If so, then some of that profit should find its way back to you in the form of dividends.
This isn’t something that was only available to past generations. You can invest in proven companies that have been around for decades, just as you can invest in new companies that are coming up with new ideas and which might become the success stories of the future.
Im not sure why you think a whole generation will try to sell their portfolios 20 years from now? But if they do, and if the companies in those portfolios are doing well, then that generation of sellers will find a lot of buyers wanting to take the shares off their hands, and perhaps start their own investment journey!