Aw, lots of people in ST were racist, or specie-ist.
How many times does someone remark "Typical Klingon, always yadda yadda yadda" or "That would be the Romulan way of..." or "Leave it to the Ferengi to..." or "Only a Vulcan would do something something".
No one seems to mind generalizing entire races. But use that same language when talking about Irish or Japanese or Jews or Africans or French or Hindus or any other human group...
True, but in the Star Trek world contrary to our real world, those generalisations appear to be based on fact. It's not prejudice if it's true. (which is actually even worse than if just some of the characters were racist)