1) If you put money into a bank, they pay you very low interest. These days, that's about 1%. Meanwhile, they loan the money to someone on a credit card, and make 12 to 25%. So they are making money with your money.
2) If you have a job and deposit money into the account, they know you'll have money coming in as long as you have a job. If you get a credit line or credit card, then you have to pay it back with interest. So if you borrow more than you can pay, then they make money loaning you money. And they know you have a job, so they know you can pay back.
Please be careful - don't borrow money unless you have to, and don't borrow what you can't be sure to pay back!