Its profit in the long run yes. But in short term extra people accumulating debt means less cash floating around the bank to put into other investments.
This can be an actual problem if it someone goes to withdraw their balance and the bank literally doesn't have money becuse too many of their credit users spent the banks cash.
Banks also need to hold on to cash if you have a massive credit line, even if it's not used, because they need to be ready to use it. So banks already have reserves to handle increases in demand, and they can close some dormant accounts to free up cash if needed. For example, I have something like $100k in total credit limit across a dozen or so cards, get I only use like $4-5k at a time and pay mine off every month. So I'm taking a disproportionate share of the total credit limit, so banks want to close my cards (and they have closed like 2 in the past year due to lack of use).
They also hedge and buy insurance to cover potential defaults and then they write off the bad loan they got stuck with to help offset taxes... So it's kinda good in a way and they want some but it makes business sense to find the right balance to keep regulators happy and make maximum profit.
See the problem with this is that not enough people are doing it. If a large enough percentage of the population just stopped paying their credit card bills, the institutions that rely on them would just implode. But that doesn't happen, and until the overwhelming majority of the country is starving to death or something similar, because they can't afford food, it won't ever happen. And if we get to that point, there's going to be bigger problems for the banks. Like having their CEOs dragged into the street and eaten.