It's not that common today (and there are legal issues in some states), but I can easily see an establishment that gets to the 90% (or whatever) credit card/smartphone payment range deciding to just dump cash entirely.
How? Once they've poured your drink and ask for money, they can't refuse your cash payment[0] (that's what "legal tender" means). I suppose they could forbid you from ordering another at that point, or ban you....
[0] ETA: or rather, they can refuse it, but only if they forgive the debt. If you try to pay a debt in legal cash, they can't tell you "no you need to pay us some other way".
(IANAL)
It's clearly not all debts. I actually can't think of any debts this applies to. Your student loan, credit card, auto loan, home loan, water bill, power bill, heck even rent if you're in a modern corporately owned complex... would never under any circumstances accept cash payment. It would be stunning if one even provided an address that isn't a PO box, let alone an address where you could get in the front door if you showed up in person, assuming you were willing to travel a few thousand miles.
At most there might be something like a retail bank branch where you could deposit cash and then request an electronic transmission of the same amount of money.
YANAL, as you said, and this is a common misconception about what “legal tender” is.