This is usually mostly circumvented by demanding "EXACT CHANGE" though. In most states, there are sales tax at several levels that don't apply uniformly, so it is nearly impossible or too time-consuming to use cash, because you simply don't know how much you'll have to pay.
I believe there's laws in some states that require cash to be accepted.