The government doesn't set off EMPs to stop zombies, it sets them off to stop people who have the zombie plague but have not yet turned into zombies. This was done because infected people were fleeing from urban areas by car, train, plane, etc., and were only spreading the plague faster. Having watched all of Europe and the Pacific Rim countries collapse in just days or weeks to the plague, the government used EMPs as a last, desperate measure. It didn't work.