Yeah, one of the many reasons to dislike the show is its superficiality in that regard; as an artifact of the time, it's reflective of a certain kind of discomfort at the end of the 1960s amongst traditional liberals and isn't dissimilar from TOS's slightly schizoid take on American militarism.
What's so bad about that? Granted the late Sixties was turbulent and not the best of times for the whole world, but still, Star Trek was an intelligent science fiction series.
Unlike Voyage To The Bottom Of The Sea and Lost In Space, TOS was a show that addressed the political, social, and religious issues of that certain time. Even beyond that with the first six films(the Seventies, the Eighties, the Nineties, and today).
I don't see a problem with a morality play being displayed under the creative tracking/guise of science fiction. In 1968, the original Planet Of The Apes did the same thing, with equal and successful results.
And the commentaries of those times are still relevant to this day. Social Commentaries that humanity need to start paying more attention to.
We do not want to forget that discomfort. If not remembered then it is doomed to repeat itself. The concentration camps of the Nazis were horrifically appalling, so there are many people who wish to forget or even deny they existed. And yet today such camps still exist in other places such as Africa.
So yes this episode is really best understood in the context of the day. It aired in January of 1969. In the year prior, both Robert Kennedy and Dr. Martin Luther King were assassinated, two men who were strong proponents of equal rights for all people.
Although I do not particularly enjoy this episode, it does speak volumes about the tumultuous nature of the times. That racism left to its own devices will undoubtedly lead to much destruction. How sad that humanity must continually fight so hard to keep it from tearing itself apart. Those of us fortunate to live in the 1st world are mostly clouded by an illusion of technology. We do not see the real ugliness of humanity that is still so prevalent throughout the world. We cannot afford to leave it unchecked. We must be charitable with our wealth and help others to build themselves up out of poverty and oppression. If we had done so with the poor civilians left over in Afghanistan after the USSR was forced out, it would not have become a breeding ground of hatred that lead to this overt assault on our way of life.
I am a Caucasian man of European descent.