One minor quibble with the OP: this was
a Prime Directive situation, regardless of the danger posed to the ship and landing party. It was established--I think in "The Omega Glory" (another shitty episode; seriously. I've loathed it and "The Apple" both since I was a child)--that a starship captain was required to sacrifice his life and the life of his crew if saving them meant violating it.
On another note, did anyone else catch that this is the only time we see a landing beam down in shifts, solely for the plot-driven reason that there needed to be a very high red shirt body count?