The ship's core directive is to keep humanity safe. The ship is on the verge of sentience, but not quite there.
Why do many smart humans use so much of their time devising ways to have more sex? Because fulfilling the instinctive urge is pleasurable on a different level than intellectual work. Maybe for the AI, pursuit of its core directive is similarly pleasurable in an axiomatic way.
I see what you did there