@askak: Because the factory reset isn't a magical fairy wand
. It basically just unregisters the device, and wipe the user content & settings.
Most hacks take root somewhat deeper than that in the system, parts that a factory reset won't ever affect.