In Star Trek: Discovery S02E14 ("Such Sweet Sorrow, Part 2"), an undetonated photon torpedo becomes lodged in the Enterprise, and the only way to protect the ship is to close the blast door between the room in which it resides and the rest of the ship before it explodes.
The automated door-close mechanism also seems to be damaged, so Admiral Cornwell is forced to stay on the torpedo side of the door to use the manual door-close handle to close the door, sacrificing herself to save the rest of the ship.
But why was this sacrifice necessary? (Leaving aside other possible solutions) Why did they not simply beam the Admiral back to safety as soon as she had closed the door?