To be fair most of logic vs emotion episodes are heavily rigged in favor of emotion, but even though this one is rigged as well it still manages to really fail in its intent.
The point of the episode is supposed to be that emotion beats logic, but the results of the episode are precisely the opposite. Emotional people make bad decision, like irrationally insisting on "properly" burying the deceased while still under threat, arguing for wholesale slaughter of indigenous lifeforms, and all around not helping at all by being unnecessarily confrontational and offering no helpful alternatives at all to Spocks decision. Scotty is the only one that actually contributes ideas and does his job while others do nothing but complain and rage at Spock for no reason.
Spock's decisions are the right ones, his only mistake is when he's having a crisis of logic while the shuttle is being hit by rocks and he's questioning his decisions, which is a borderline emotional outburst, but once he snaps out of it again he's the one that comes up with a solution while the rest just panic and shout at him how he was wrong.
The alleged emotional "act of desperation" at the end is also a perfectly logical decision.
So I guess I have this kind of weird reaction to this episode, I really like it for what it actually does despite the fact that it's not what the writer intended at all.
I felt the same way, almost, for years. It did seem as if the viewpoint of the writer was far more for "human/emotional", than for Spock. It's strange how we can be so sure that we know what the writer's intent was, despite our having been handed such a conflicted episode. It doesn't help that our society's general point of view is to put "emotion -- right or wrong" up on a pedestal. Decide with your heart, not your head (as if the two have to be mutually exclusive). And before, in science fiction, aliens were often the baddies, and evil, specifically because they were for intellect over "good old human emotion". In context, it had to look as if G7 was more of the same.
---------------------
But note all those scenes where Spock turned out to have been right. Those
were in the episode. We see the practical consequences of rejecting Spock. And since the writing isn't contrived or forced, it almost seems as if Spock's side hasn't even occurred to the writer himself.
========
The biggest contradictory moment always seemed to me to be when they're all arguing over whether or not to give the giants a bloody nose (I think?). Spock says he's often appalled at the low regard Earth men have for life. A human being then says
"At least we're practical about it!"
===============
Now, that seemed unintentionally contradictory to me, for decades. Now, though, it seems to me to be the pivotal moment, as far as its overall message. The hypocrisy of that, the 180 degree turnabout on the part of the human crewman, there's where the truth comes out. The humans had been riding Spock for being callous and calculating, and getting them killed, as a result of not empathizing with and protecting them enough. He doesn't feel like we decent folk do, supposedly.
================
Then what's-his-name shoots off his mouth about how they've got to kill just to scare the aliens off. Suddenly Spock's the bleeding heart, and it's the good old, right-minded human who doesn't let sentiment get in the way, and is "practical" about death.
------------------------
One thing tripping us up here is that TV takes sides. It usually has one message, and it's right, and the other side is wrong. In real life, the other side often has good arguments, and it irritatingly and disorientingly refuses to send out "villain" signals. The "writer" gives no clue whatsoever who's in the right. G7 is like that. Which side seems "right" shifts maddeningly from moment to moment. It eventually comes down on Spock's side, I think, but the humans' point of view was to some extent understandable, and not always completely wrong.
==============
As for racism, they think Spock's logic is going to get them killed. While that logic is attached to the fact that he's a Vulcan, and due to that, and yes, associated with that in all their heads.... still, this is panic over his decision-making, not hatred of ethnicity or skin color.