I am a non-US citizen and last year I was on a cruise that departed from USA to the Caribbean. The ship was Italian, but most of the tourists were from the United States, the vast rest Europeans. Nobody ever took my passport during the journey and I had it always with me. Before boarding the ship, still in the port, they copied its first page for the immigration "pre-clear" or how you Americans call it... Despite we had a safe in our cabin, they advised us to keep the passports always with us and especially when leaving the ship. As far as I remember, actually you couldn't board the ship without the passport with the ship's ID card issued to each passenger, or the driving licence if you were American (probably because they can travel on the Caribbean without it...afaik). The most interesting thing was that citizens of my country need visas for entering most of the countries I visited on the cruise (which I didn't have) and I didn't have problems at all... Very strange which I still don't understand.
In the ports nobody asked for the passports, it was only for boarding the ship (asked by ship's security) and for emergencies. I think it is more wise to keep the passport with yourself. If you lose it you always have a copy on the ship, or even with yourself in the bag or another pocket.