Speaking as someone who spends a lot of time poking around the RimWorld codebase, it's mostly because the game's UI tends to round things to pretty then up for the player. Under the hood, infections are usually some ugly decimal number (like .9956424) that visually round up, it isn't until that number is fully at/ about 1 that the death by infection mechanism is triggered.
Yeah, it's very lucky when infection hits 100 while Immunity is at 99.7, it's much safer to amputate or stick them in cryo while you trade or kill for glitterworld meds
Maybe there's some luck involved or something, but twice I have done it, twice I saved the pawn (only for them to die soon after in horrible ways, like hamsters do)