Almost always these vehicles have names, eg, "Red October", Millennium Falcon" and play important roles in the story. So it would seem natural for them to be a little humanized, or at least considered living beings. But why just female beings?
Is it because they inspire a sense of protection, nourishment and survival, as a mother would do, expecially during battles, or is the explanation to be found absolutely elsewhere?
In my language, addressing a ship by "she" is just the natural way, because "ship" (nave) is a feminine noun. The same is for "spaceship", (nave spaziale or astronave). But not for "submarine" (sottomarino), which is masculine. One would say to the captain of a sottomarino "Ferma la discesa o lo perderai". However, if the submarine in question had a woman name, eg. Priscilla, then the sentence would be "Ferma la discesa o la perderai".
Incidentally, can't figure out how funny it would be to hear "Priscilla ci ha silurato!" (Priscilla torpedoed us!)

Thanks,
Franco