In the exposition of "The Secret Sharer" by Joseph Conrad, the young captain as narrator remarks that he "was somewhat of a stranger to [him]self." Then, when he first sees Legatt he notes, "He was complete but for the head. A headless corpse!" And, then, even as Leggatt is yet in the water before boarding the ship, the captain declares, "a mysterious communication was established between us two--...I was young, too. When he pulls Leggatt out, he comments, [he] followed me like a double...."
Clearly, with the word double being used 19 times in this narrative, the captain and Leggatt are doppelgangers; Leggatt, about whom the captain says, "I gazed upon my other self," as they have their "dark heads together," is the darker side of the captain, the animalistic side. As Leggatt relates the murder he has committed, the captain comments,
And I knew well enough also that in my double there was no homicidal ruffian. I did not think of asking him for details, and he told me the story roughly in brusque, disconnected sentences....I saw it all going on as though I were myself inside that other sleeping suit.
It is, therefore, his darker side that the captain hides from his crew, a side that he wishes no one to know, the "unexpected sharer of [his] cabin who appears in the dark waters beneath his ship. It is to protect himself as well as his "double" that the captain hides Leggatt, and, finally sets free into the dark waters. While not morally defensible, the captain's actions are self-preservative.