The scene is from one of the star trek movies: The Wrath of Kahn. Kahn has taken over the Enterprise and abandoning Kirk on a planet. In the movie Kirk yells Kahn’s name and the camera pans back to show the helplessness of being stranded while the yell reverberates up to space.
It was a ruse. Kirk wanted Khan to think he (Khan) had successfully stranded Kirk.
Great movie, BTW: If you have not seen it, glee, you should!