A company can do a lot of things with its profits. It can reinvest them in the business by expanding into new markets or geographic areas. Perhaps it makes sense to lease retail space in malls from Prince Edward Island to the wilds of Vancouver, BC to put up lemonade kiosks, but maybe it doesn't make sense this year (mall space is too expensive this year or the market's currently hotter for bubble tea and lemonade would be confusing).
A company could instead decide to buy other companies. Maybe the bubble tea fad burst and all of the bubble tea shops are going out of business, but you could buy one of them at a huge discount and sell bubble tea to people who really love it (the market isn't entirely going away). Then again, maybe there are no good acquisition targets.
A company could invest the money in other financial instruments, such as bonds or, well, other stocks. That's risky, though, and how does the board of directors know that it'll make better investments than shareholders could make on their own?
A company could keep the cash on hand, just in case something unexpected happens. Better to have a nest egg (can a corporation stuff a few million dollars under a mattress?) than to not.
If none of these options make sense, the board of directors might decide to return some of those profits to shareholders. That's your dividend check, right there.