Yes, private entities must be free to do what they want. Jim Crow laws were government. Those laws should not have been allowed, but if private business did not want to serve anyone for any reason, it must be allowed. Anything else is tyranny.
As black economists Thomas Sowell and Walter Williams point out, there is a cost to discrimination. If a business does not want to serve blacks, whites, women, or people with long hair, there will be several businesses just down the street that will be happy to take those customers.
I don’t disagree that opportunity cost isn’t real. But we are way beyond that.