In the UK there is a list of so-called protected characteristics that originates from EU law. It includes sex, race, age, sexual orientation, religion. It is not legal to discriminate based on those. In general it is legal to otherwise refuse service. I suspect the US are similar.
On the other hand, for example in France it is illegal to refuse service unless you have a good reason to.
So in the UK if I walk to a market stall with money in my hand they are free to refuse to sell to me (I suspect the same is true in the US), but in France they would need a 'good reason' to refuse.
> So in the UK if I walk to a market stall with money in my hand they are free to refuse to sell to me,
But I do not understand how can this be enforced. If for example you are gay and are refused service, can't you claim that it is due to your sexual orientation? Conversely, if the shop wants to expel you because of illegal reasons, can't they always claim that it is due to some other, ridiculous but valid reason?
On the other hand, for example in France it is illegal to refuse service unless you have a good reason to.
So in the UK if I walk to a market stall with money in my hand they are free to refuse to sell to me (I suspect the same is true in the US), but in France they would need a 'good reason' to refuse.