This is likely because all of the exploits jailbreaks or malware use are flaws in already running processes, but when the phone is rebooted, hardware root of trust verifies everything that loads is signed by Apple, clearing out the virus/jailbreak unless it was manually invoked (or plugged into the GrayKey) again to re-exploit those processes.
Of course, in the unlikely event that you happened to have an iPhone without the new Secure Storage component mentioned on this thread, be arrested, and the cops were trying to "Hide UI" on you, it would be really awkward for them if you rebooted your phone first ruining the trap. "Wait, no, you're supposed to enter your PIN right now!"