I don't think taking the example of doctors is relevant as they have a professional code of conduct to follow.
Also there are commerce explicitly having some constraints and requirements for the clientele they serve. Like bars they don't accept minors, amusement parks attractions stating for...