Card services actually get a small fee per transaction from the retailer so they just get paid every time you use their card which can add up.
If you fail to pay off the balance for any reason they can charge generally a 20%+ compounding interest that for most people is probably closer to 27-30% and quickly replaces the minimal cash back.
Spending habits and ability to sell the data to other card/loan providers and advertisers can help generate additional revenue. Think maybe you consider them trustworthy and they offer a car loan for $30,000 and you take it happily without looking around to find out they have a much higher interest rate on it and they get an extra couple grand from you.
Few tricks.