Sure, but you are gambling that their reinvestment will raise their stock value in the long run so that eventually you will make money. It's still a gamble, though.
It's an investment. You buy equity in something that produces value. Paying dividends or not is a non issue. Sure there is risk but it's different than buying lottery tickets or imaginary internet money. Conflating the two in the eyes of the public was great success of crypto currency pump and dumpers.