I would say a private business can set any rules they want: "No shirt, No shoes, No service".
To local businesses, remember that we do have a choice. We have all discovered how easy (easier and cheaper?) it is to buy online and have the item delivered via Fed Ex or UPS. The “buy local” mantra is a joke. And follow through and start doing it. You really don't need local businesses for nonessentials.
Remind the business of this and then threaten to spread the word about how you were mistreated at their store.
That is about all you can do.