Mindrape being [Evil]? Probably because it involves forcibly altering a fundamental part of a person's personality. And they don't even know that it happened.
Stereotypes yes, but that's part of the flavor of a race. Elves? I got nothing on that really. ScM? Gnomes are the only core race, which is the only thing that can be absolutely assumed in use, that has access to SLAs and their SLAs involve [Illusion] so naturally they'd create a PrC devoted to a magic that they are innately gifted with. Dunno why its related to [Shadow] but it makes sense for them to have a PrC devoted to improving their innate abilities. Dwarven Defender? Even from a mechanical standpoint, Dwarves are the race that's all about being an immovable object against unrelenting force. Well, Core race at least and DD is a Core PrC. Its not going to consider other races that weren't printed at the time.
Do some of these reasonings rely on Flavor? Yes. But that was the only sure thing about a race that the writers had to work with. They couldn't anticipate all variations and permutations of flavor individual DMs would come up with, so they made PrCs/feats/options that fit the default flavor of a race.