Sailors have a long tradition of superstition; looking for any edge they could find to give them comfort on stormy nights at sea. There are so many facets the ancient sailor´s life that he has no control over—the sea, the weather – that he seemed to seize control over any aspect he could. Women were considered bad luck, and that having a woman on board a ship when it was at sea would anger the sea gods, bringing on horrible weather and rough water.
The most ironic twist to the "women on ship are bad luck" superstition was the flip side of the coin, a superstition that had women being good luck in connection with the ship. Put this together with the power of a bare chested woman to "shame nature" and keep the waves away, and you have the reason behind the popularity of topless women depicted as figureheads on many sailing ships.
Keeping women off of a working ship, and like many superstitions in the work place comes from a very sensible origin. The fact is while in some cases there were rules against women on board ship (not passenger ships, however) it was more often due to the distracter factor than any superstition. A woman on board a ship full of men on a months-long voyage could bring on all sorts of headaches for the captain, not to mention the woman.