Although we're all taught not to be prejudice, generalise or discriminate, those things do work in many scenarios. Human cognition cannot fully function without those things. A person fundamentally stripped of those facilities would be clinically dysfunctional. In all likelihood borderline vegetative or severely retarded. In reality we don't see that, people are doing those things all the time even those who say they don't. The definition tends to exclude cases people do automatically that aren't prohibited and don't even think to classify it. Buying food is an example of a very discriminatory process with a lot of prejudice and generalisation.
We live in a society that does more to tell use never to do those things rather than when and when not to. Such as over applying them, being bad at those things (getting it wrong) and applying them where the damage to society as well as reinforcement of conditions is severe (employment, justice, political participation, welfare, etc). In some places things such as prejudice gain little but lose plenty.
When it comes to sex, different story, it's entirely up to the individual. There are domains of choice that always belong to the individual and not society, that's one of them. Even if it's not precise or outright wrong.