I’ve read books before & then seen movies (who have no obvious connection)...and thought just the same thing…
I’ve noticed also that if it was the plot in an hour-long Star Trek episode, it has also been created into a 2 hour + movie. (But not necessarily in a Star Trek movie.)