If the value of a company is equel to the market cap, and the discounted dividends is equel to the share price: then how does it add up that if one was to buy all the shares, i.e. privatise the company, they then have the right/access to all the future profits which is greater than the dividend payout amount.

Is it that its based on the idea that all profits eventually go to shareholders either through reinvestment in the firm or as dividends???????

So basically, when i want to buy a company am i paying for the right to all future dividends or all future profits? Or do these eventually equel?

I understand this topic but not all of its application.

Thanks for any help