Remember, profit is basically returning money back to your shareholders. If you have an investment opportunity that's 10x better than public markets (100% growth vs 10% growth), why would you ever want to return money back?
No, paying a dividend is returning money back to your shareholders. Profit (revenue in excess of expenses) can be re-invested back into the company, for example, to hire more people or finance the development of new products. That's how companies grow once they no longer have VC funding (or if they never had VC funding to begin with).
For example, Google is a very profitable company, but none of that profit is being returned to their shareholders since they don't pay a dividend. It's all being reinvested into the company. (The only way a Google shareholder can benefit from Google's increased value is by selling their stock to somebody else.)
Of course, even the word profit itself is ambiguous because it's potentially referring to multiple different concepts. The aim, for this was to illustrate at a high level why investors generally don't want a company to be profitable until they want it to be very profitable.