Cash also helps with tipping. If I hand a waiter cash, I know it goes to them. If I write a tip as a line item on the check, who knows how management is skimming that pool.
Then there is the security aspect. Credit card info can be leaked or scammed many ways. Meanwhile, with a cash payment our relationship is severed the minute I leave the establishment. There is no opportunity for you to collect my info, or for a hacker to steal my info through you, or to take any more money from me than the finite amount I already gave you.
Plus there is the human aspect too. Many people beg for cash, but also many small business owners cannot afford to work over the table. I'm talking things like food vendors in trucks or simply on tables on the sidewalk. I love me some al pastor, and I know that should these businesses have to go from grey market to white market they wouldn't nearly be so viable. Cash makes these sorts of businesses possible and provides a lot of opportunities for plenty of people that for many reasons, do not currently use electronic means.