Well, they still pay a fee, it’s just reduced.
They primarily don’t deal with cash because cash is a pain. It needs to be physically taken to a bank and protected from theft by both staff and random robbers with guns, it needs to be counted all the time, and you need to maintain the right denominations to make change.
I have reservations about businesses getting rid of cash, especially if they’re turning away people who don’t have alternative ways to pay, but I certainly understand why they do it.
It’s also always awkward when a coffee shop is like 95% credit, and you try to hand them cash and they look at you like you’re Rip Van Winkle.