Although I’ve seen studies which show that people spending via credit card spend more than those paying cash. So the restaurant may end up selling more drinks or coffee and dessert to patrons who are paying via credit. Which would then make up for the credit processing fees they have to pay.
Another issue is that handling cash has its own costs of doing business. Someone has to count the cash, lock it in the safe, be responsible for it, make sure someone goes to the bank on Monday to deposit it, etc.
There are advantages in both approaches. I would have to think that all franchised businesses would want to go cashless tomorrow if they could. It would eliminate petty theft and make the balance sheets very straightforward.
Of course, your buddy Joe who owns a bar probably prefers cash, because in those types of businesses, no one declares EVERYTHING to the government. My uncle owned a dance club in the 50s. When he died, his wife went into their safety deposit box and found $20 grand in very old cash.