About 5.5% of Americans don't have bank accounts and pay primarily with cash. Most of these people are impoverished minorities, specifically blacks and Latinos. Not accepting cash is a pretty discriminatory practice.
Handling cash is a hassle. It carries risk in terms of losing it, and it takes time to count it and transport/deposit it into a bank. All things that eat into your profit margin, in an industry that has crazy low margin.
It takes time to do those things. Time is money. It takes time to reconcile in a double entry accounting system the cash you received in business operations. Software does it automatically.