people buy stocks because there is more to Return on Investment than whether dividends are issued or not.
Some people want ownership and the ability to influence decisions by using the rights associated with their class of stock.
Another reason would be to park capital in a place that would grow faster than the rate of inflation.
these are only a few of many reasons why people would buy stock.