Why do people buy stocks that pay no dividend?
Because they will have to start paying dividend or repurchasing shares, equivalently, in the future.
A company can be expected to have about 8% yield. Most large companies distribute about 3% dividend, meaning the company grows 5%. Now, if one company invests all of the profits to its own business, its growth is 8% per year, not 5% per year.
In 200 years, the company growing 8% per year is relatively 1.08^200/1.05^200 times or 279.83 times bigger, relatively speaking.
So if you own shares of an average-yield company that constitutes 1% of world economy and pays no dividend, in 200 years it would constitute 279.83% of world economy, a mathematical impossibility.
The only reason why a company would pay no dividend is that reinvesting into the business is a better idea than distributing the money to shareholders.
The only value of a company to its shareholders is dividends (or equivalently, share repurchases). The value of a company is the net present value of all distributed dividends, nothing more than that.
It does not matter if the company pays dividends already today, or if you have to wait for 200 years to get the first dividend. In both cases, the value of the company is just the same.
So, to summarize: because they will pay dividend, in the future.