Owning a stock is like owning a fraction of a company. The value of stock comes from the following:
(1) dividends (that is, a fraction of current profits)
(2) assets (that is, a fraction of stuff the company has that could be sold; one of Warren Buffett's strategies is to buy companies that have more assets than their total stock price, such that merely liquidating the company would turn a profit.)
(3) estimated future dividends (a company may not presently be paying dividends, but may be on a clear trajectory to profitability and therefore future dividends)
(4) estimated future assets ("growth" type stocks are in companies that are investing profits in assets rather than paying out dividends. This has certain tax advantages over dividend-paying stocks.)
(5) estimated future valuations (that is, guesses as to what others might pay for the stock later)
Notice that only one of these involves perceptions of others' valuations. The rest are a matter of company performance.
Companies can start to pay dividends even if they have avoided them for a vary long period of time. EX: Microsoft
Companies can also be bought out and have their total stock price + a small premium paid out to their investors.
And finally rather than pay a dividend a stock buy back program can accomplish the same net result with significant tax advantages.