During the gold rush, the City Of San Francisco became something unique in the history of maritime commerce. It became the roach motel of maritime commerce. Ships sailed into the bay and never left.
In time the vessels were all bunched up in the bay waiting for crews that had disappeared into the hills. Eventually there were 500 vessels of various sorts piled up in the bay, having met the fate of the Niantic, a whaling vessel turned passenger ship that went to San Francisco, later being turned into a hotel and warehouse.
Because the gold rush was such a powerful attractor of young men, looking to seek their fortunes, a ship would sail into the bay and the crew, being primarily young men would along with the passengers promptly take their pay and head for the hills, leaving the ship stranded. Of course captains and the ship owners would do just about anything to get a crew back, which is why to this day Shanghaiing means being forced to do something or being kidnapped.
After a stint in the gold fields the sailors would come back to the Barbary Coast, a notorious red light district. And drink up. And become attached to ladies of low virtue. Becoming as a result a prime target.
Once rendered incapable through one means of another, the poor seaman would be kidnapped by the crimps and find themselves at sea on their way to China and once they started a voyage, by law, the seaman was committed to finishing it, which would be back in NY or Boston after the ship made it’s tea run.
Still, only the ships with the greatest return could afford to pay the crimpers fees and slip out while the rest were stuck. Which is why to this day, there are ships being dug up in San Francisco.