The sultan had 12 viziers. He found out that some of the viziers had unfaithful wives. He decided to punish them.
The punishment would only be for those with unfaithful wives.
Or, the unfaithful wives understood that they wouldn't be let go alive anyway (not by their husbands, but by the sultan) and therefore didn't beg for forgiveness or didn't beg well, while the others felt it was unfair to die and actively persuaded their husbands.