People forget that the credit card companies charge businesses to process transactions. Some stores/restaurants even give discounts for paying in cash because of this.
In my country if you pay with credit card at a grocery store (or anywhere) you get 3.5% tacked on to your bill. Merchants don't eat the cost, and don't hide it in the listed price of goods; it's explicitly passed on.
This is explicitly forbidden by almost all card processing networks (and by the government, in many countries). If you report a business who is doing this to the card processor, they'll likely get their card processing privileges suspended.
On the other hand, cash has its costs. You need to have a register, more training, more insurance, processing of cash at the bank, having it deposit cash at the end of every day, etc.
With credit cards you pay a fee, but you don't have to deal with all of those other things that people often don't consider.
Here in the deep (American) South, small businesses give discounts for cash because those global elites are trying to take away our cash and want to track us or whatever. To that mindset, cash is a way to resist a theoretical oppression.
I know that this is true (I used to work in card payment infrastructure), but I've also talked to people who run cash businesses and deliberately under report their income. So I think it's not so uncommon.