Well they don't know! But they are beginning to discover mechanisms that AI models employ. Video below well worth a listen, although it doesn't really say anything!
And we cannot forget Douglas Adams and the "ultimate supercomputer" called "Deep Thought", which was asked "How much is 8 x 7?" To which the answer was "42".
That segment in the video talking about a system that cloned itself to avoid facing a conflicted set of tasks, then evading the explanation, is reminiscent of When HARLIE Was One by David Gerrold. The similarity is that the AI named HARLIE faced its own "mortality" and so came up with a project that only it could perform - and the proposed project was SO potentially important that they couldn't pass it up. So "prevarication when faced with termination" - self-preservation, which was a proof of sentience.