they earn from surcharge (that's why some shops refuse to accept credit cards, or require a minimum amount for it) on the shops.
they earn from interest impose on you if not paid back on time.
...
Don't worry for credit card issuers (these need not be banks). They have plenty of ways to make money out of you (or your actions, if that matters).