I can imagine this scenario:
Cashier: Your total comes to $8.45.
Customer: All I have is a $20. Is that okay?
Cashier: Yes, it’s San Francisco law that we accept cash.
Customer: Okay, here.
Customer: …
Customer: Where’s my change?
Cashier: We accept cash, we don’t give change.
The San Francisco law doesn’t require that change be given. Be prepared to carry small bills and coins.