Once all the partitions are deleted and the Master Boot Record is overwritten with a fresh copy, any malware on the diskis reduced to useless, helpless data. There's nothing magic about it: it must have a launch vector. The only way around repartitioning and MBR-renewal is to infect CMOS, but to date no known malware has done this, and disk-wiping would be ineffectual in any case.
Disk wiping is done to preclude others who may come into possession of the disk from viewing data.