Cash flow is money actually moving in and out of your pocket. Profit is an accounting idea: what you earned, whether or not you've collected it.
Picture a lemonade stand. You spend $20 on lemons and cups. You sell $50 of lemonade, but some neighbors say they'll pay you next week. On paper you made $30. In your pocket, you have far less. If the table rent is due Friday, you miss it while being "profitable."
Businesses fail when they run out of cash, not when they run out of profit.
Where the numbers come from
Try it: push "pay you later" to 0% and the rent problem disappears, with the exact same profit.