Humans have tribal instincts and that will always be the case. The question is how to promote diversity. That, I believe, is a complex question with a complex answer. I am not sure. What I am sure of, because there is tons of data to support this, is that affirmative action does not work.
For example, the recent California law mandating quotas for women in executive boards will not only not work in fostering diversity, it will degrade the reputation of women reaching that level on their own merit.
People not only don't learn from history, they also don't understand statistics. One piece of "evidence" in support of the law was the statement that companies with women in their executive boards did better than companies with all-male boards. This argument begs a few questions: 1) Why is the conclusion, then, that more women in boards will cause companies to be better managed?; 2) Why is the conclusion not that companies with more talented professionals are naturally more inclusive of women and also better performing?; 3) Why should the state tell companies how achieve better management? And so on.