In "These Are the Voyages," Cushman reports that the actor playing Joe told him, "I questioned Marc Daniels [the director] about whether a Star Fleet officer who probably had at least a PhD in engineering would be stupid enough to take his glove off in that situation. He said, 'Of course not. But if you don't do it, we don't have a show.'"
When people use that one on me, my response is always, "If your story (or show) requires your characters to act like idiots, you
already don't have much of a story."
Well, but four things:
1. The focus of story is really about what happens after the Psi 2000 virus makes it to the ship; how it gets to the ship is just hand-waving.

And with only 50 minutes to play with, they have to get it to the ship quickly, without spending a whole lot of time on how.
2. The creative team was writing this stuff blindingly fast, often tearing the pages out of the typewriter and giving them to the actors ten minutes before they were supposed to
say those lines. Working at that pace, it's a wonder their stuff held together at all. (And I'm always amazed that the actors managed to learn their lines under such conditions, especially Shatner, who usually had the longest speeches, and Nimoy, who usually had big paragraphs of exposition that were full of details that just had to be memorized.)
3. Writers, actors, directors, and producers typically get little or no scientific training, so the people who made this stuff usually know a lot less about how their characters would and should behave than the typical Star Trek FAN does. My husband and I both have scientific training, and we both often bang our heads against the wall and say, "But Spock wouldn't SAY that, because scientists don't behave that way!" Then we remind ourselves that most writers don't know this stuff.
4. The 60's were a very different time. We've had a lot of shows that delve into the minutia of how things get done in the intervening years (e.g., the CSI shows), but at the time, hand-waving on the details was a lot more common.