Strictly speaking, he was employed to be a companion to the captain who believed having such a person on board would keep him sane and prevent him from committing suicide like a couple of his relatives. It worked. Although he did indeed kill himself.