Discrimination in commercial transactions within the public marketplace are illegal (c.f. Katzenbach v. McClung, et al) and discriminatory membership requirements for "private" clubs that operate in public is unpleasant, but I have no idea how to fix that particular problem legally so we solve it with the previously noted social pressure (aka "mob justice") and this seems to work reasonably well. OTOH, the state does not get to tell you who your friends will be or who you should be spending your time with.
They are illegal, yes. I was wondering whether OP also treats it as "just freedom of association", since fundamentally refusing to serve some customer for any reason whatsoever is exactly that - and yet most people would agree that, done on such scale, it violates people's rights, too.