Caused by the Values of each group in
a Storytelling hack:
Why do Starfleet command crew wear gold in the classic era and maroon in TNG? Because they're Gryffindor.
Which makes Spock Ravenclaw and Scotty Hufflepuff. (Bones doesn't really fit, but blue is also Medical in real life, so...)
Romulans are obviously Slytherin.
Klingons are Hagrid.