Generalisations _can_ be used to push "social dogma", but it doesn't have to be, and it doesn't mean generalisations are automatically a bad thing. They are a useful evolutionary shortcut our brains invented.
If I see 100 people with easily identifiable attribute X, and 90 of them are mean to me, my brain makes a useful shortcut in the form of a label and says "attribute X" is connected to being treated meanly, avoid those guys. It's not that I don't know 10 of them treat me fine, it's just that it's less of a problem to miss out on 10 potential friends to avoid having to deal with 90 meanies.
It's probably important to say that I'm speaking as a "brown person", who has been "discriminated" against plenty in my life. I don't make a fuss when I get "randomly selected" every single time at the airport, because they're working with statistics.