They are paying you to use their credit card, so they can make money too. When you buy anything with a credit card, the card company gets up to three percent of your payment. They also know that some people will carry a balance and pay them interest.

Banks would prefer you paid by a debit card instead of a credit card, so they can get the whole transaction fee.