The seminal work on this tendency we humans have to classify and rank each other is Stephen Jay Gould's The Mismeasure of Man
https://en.wikipedia.org/wiki/The_Mismeasure_of_Man
If you have a chance, it's worth a read. It's on my list of the top ten most important books I've ever read and it permanently altered the way I think about the way we think about ourselves.