There are a few possible explanations for Dante’s anger toward the soul in the mud-- there is not one reason which is obvious or correct. First, since the wrathful had accepted cruelty and denied pity in life, in death no pity could be given them.
Another reason might be that Dante is beginning to change and to reject sin in all its forms.
A third reason might be the fact that the remarks and actions of the wrathful soul in the mud angered Dante.
A fourth reason might be that the soul in the mud was an enemy of Dante when they were both in Florence-- Dante says that he knows the person. Some interpreters believe the soul to be Filippo Argenti.