The Prophet said when a person becomes angry they should say this dua. He explained that anger comes from Shaytan and seeking refuge in Allah extinguishes it just as water extinguishes fire.