I watched this episode for the first time in years tonight. It is probably my favorite episode of Star Trek
I had forgotten just how far they'd gone with Rand and Kirk. Her embracing him from behind on the bridge was certainly not proper Starfleet behavior!
As for our friend Stiles...the writers, whether consciously or not, captured a psychological phenomenon know as Historical Trauma
pretty well. Historical Trauma says that there are some traumas so pervasive and severe, that they can be transmitted from generation to generation.
There are several readily-available examples: Israel and Native Americans to name two.
One defining characteristic of Historical Trauma is overgeneralization. This is exactly what Stiles engages in with Spock. Traumatized people are hypervigilant toward threats, understandably so. It is classic trauma behavior to react emotionally to stimuli that remind you of the original threat. In this case, the physical similarities between Vulcans and Romulans. If you get bit by a dog, you tend to avoid all dogs for a while.
Now I'm certainly not arguing that Stiles disrespect toward a superior officer is justified, only that it is understandable in a psycho-historical context.
What a great episode!