Sure, banks have multiple revenue streams. They charge merchant fees per transaction, interest on outstanding debt, administration fees for some open accounts, interest on outstanding debt, etc.
I'm not saying I agree with all these fees or like the banking industry, but we can't just ignore some revenue streams because others exist. They all add up to a banks quarterly financial statements, and if one goes down they will do everything they can to make up for it in other areas.
Interest is charged for the outstanding debt, banks would make very little money on credit cards if everyone actually paid them off every month.