Money deposited in banks gets a lot of benefits like safe storage, checks, statements, transfer privileges, but money that banks loan out has to be positive because borrowers don’t do any favors for the banks. The ‘real’ prime interest rate (prime - cpi) is usually 2-3% tho lately it’s been less.
For the past few decades average ‘real’ credit card interest rates have hung out around 12%.
Interest also has to cover the losses from deadbeats. And there are quite a few. I know first hand.