It's all quite confusing. A non-profit can as you say turn a profit but isn't supposed to distribute it to owners.
There is a difference between positive cash flow and profit as profit has differences in accounting rules. If you invest in some asset (let's say a taxi car) today, all of that cash flow will happen today. But there will be no effect on the profit today, as your wealth is considered to have just changed form, from cash into an asset. For the purposes of profit/loss, the cost instead happens over the years as that asset depreciates. This is so that the depreciation of the asset can be compared to the income it is generating (wear and tear on car vs ride fare - gas).
There is a difference between positive cash flow and profit as profit has differences in accounting rules. If you invest in some asset (let's say a taxi car) today, all of that cash flow will happen today. But there will be no effect on the profit today, as your wealth is considered to have just changed form, from cash into an asset. For the purposes of profit/loss, the cost instead happens over the years as that asset depreciates. This is so that the depreciation of the asset can be compared to the income it is generating (wear and tear on car vs ride fare - gas).