Profit and cash are not the same thing. A company can report record profit while its bank balance barely moves. It can even report profit right up until it runs out of cash.
The reason is one rule about timing. Once you understand it, the gap between the income statement and the cash flow statement stops being a mystery and becomes a clue.