I've read that for many years, it was considered a truism in Hollywood that any movie needed a romance element in order to keep the females in the audience interested. Hence, many war and science fiction movies had a lone woman with romance on the mind shoehorned into an otherwise all-male story.