A company can have a profit but not have cash because profit is computed using revenues and expenses, which are different from the company's cash receipts and cash disbursements. In other words, there is a difference between revenues and receipts. There is also a difference between expenses and expenditures.
To illustrate, let's assume that a new company uses the accrual method of accounting. It provides $10,000 of services to its clients in its first month and the clients are allowed to pay in 30 days. The company will have $10,000 of revenues in its first month, but the cash will not be received until the second month. If the company's expenses are $7,000 in the first month, the company will report a profit of $3,000 but will not have received any cash from its clients.
Another company might have a profit of $60,000 in its first year, but during its first year it uses $65,000 of cash to acquire equipment that will be put into service at the beginning of the second year. This company will have a profit, but will not have the cash.
Other examples where cash is paid out, but the profits are not reduced at the time of the payment, include prepayments of insurance, payments to increase the inventory of merchandise on hand, and payments to reduce liabilities.