The Plague of Infernal Calvary was for two reasons, retribution and reformation.
To punish the idolatry and demon worship of men, and their sins of murder, sorcery, fornication and theft, and to keep others from following in their ways.
But it appears that those left, who were not killed, didn't repent and turn from their sins and were left for later judgments.