To be fair, writing on currency doesn't necessarily have to be legally binding. The bills also say "in god we trust", and yet I'm free to not trust in god and there are no legal consequences.
You're missing the point. Under US federal law, if I owe you a $100 debt and I hand you $100 in cash paper money then I have settled the debt. You cannot then sue me, demanding to be paid via Visa or PayPal or whatever. But this applies to debts only, not purchases.
I think you're missing my point! I'm not saying that the law doesn't actually require this; I'm just saying that there's nothing in general saying that something printed on every bill has to be true. In this case, it happens to be, but saying that it's printed on the bill isn't what proves it.
My point is that the writing on the bill isn't what actually makes the law enforceable. If Congress passed a law that required the mints to print the words "this is a flamingo" on every dollar bill, it wouldn't make it true. The fact that cash is required to be accepted is because of the law passed, not because the magic words on the bill say so.