Mudd explains that he broke out of prison, stole a spaceship, crashed on this planet, and was taken in by the androids. He says they are accommodating, but refuse to let him go unless he provides them with other humans to serve and study. Mudd informs Kirk that he and his crew are to serve this purpose and can expect to spend the rest of their lives there.
wp:I, Mudd