Burnham suspected right from the start that the rescue was a setup. She points out, when she first meets Lorca, that suddenly being transferred to another facility without advance warning, as she had been, wasn't normal procedure, and that the shuttle had altered course midflight. Lorca doesn't outright confirm it at the time but makes a comment about perhaps the universe hating wasted material. And then, as pointed out, he does confirm it later.
Then there are the other fishy aspects: why is there only a single pilot and no guards, so there's no one else inside capable to taking the controls when the autopilot suddenly fails, and why was the pilot already wearing an EVA suit before receiving instructions she's have to go outside? And the autopilot failing just as the tether "breaks"? And 20 seconds later, there's Discovery coming to the rescue. You'd expect someone miraculously rescued from certain death to be very grateful, wouldn't you? Rescued by a science ship that is shown to handle biological experimentation and samples...like perhaps energy-absorbing space bugs.
So the shuttle diverts course to meet with Discovery at the location of the energy storm. When Discovery is in position, it beams some of the space bugs on to the shuttle exterior. The pilot, as pre-planned, goes outside, cuts her tether and launches herself on a trajectory that can be seen from the inside by the prisoners, and then the autopilot, as scheduled, fails. There's a period to make the prisoners feel they're going to die, and then Discovery, already in position, tractors the shuttle. They then pick up the pilot, either transporting her aboard or picking her up in a waiting shuttle, or whatever.
The impression is that everything, including "losing the pilot" so the prisoners would feel they were in mortal danger was intentionally set up to make Burnham feel some gratitude about being rescued. It failed because she smelled a rat, which, given Lorca's comment later on recognizing her ability to do so when she sensed the Klingon ambush at the binary stars, was likely also part of his test of her to see just how mentally fit she was and if she could see through the setup.