Handling fees have changed a lot over the past few years, so there are a lot more options so retailers need to pick the one that works for them.
It used to be something like 40 p for a debit card transaction and 2% with no minimum for a credit card one, so obviously hopeless for a corner shop where people buy single low cost items if they paid with a debit card. Credit cards would have been fine, because the transaction cost would have been a couple of pence.
Now a lot of the new ones are a flat percentage with no minimum, so a lot easier to manage. You just build this into your prices so you can accept cards without paying 40 p fees on a 60 p bag of crisps for example.
Places that sell expensive things, most notably cars, tend to stick with the 'old' business model where they pay a token fee for accepting a debit card, but won't accept credit cards.
On cash, yes it does cost money to bank, but if you are a business that sells goods that can be bought from a cash and carry, you can spend a lot of it this way. You may even be able to pay staff with cash. So you only end up banking (and paying fees for) a small amount of the cash taken. Whether or not it goes through the books is a separate issue. Working this way is not a definitive indicator that tax is not being paid in full.