That would be true if all credit card customers pay their monthly bills in full, every month.
However, that is not the world we live in. Most people carry balances a majority of the time, with interest rates significantly above "the cost of money".
Further, the banks (really: card issuers) (in the US, at least), are collecting 0.5-4% of all transactions as fees.