Allah sent the prophet (sa) with the command to purify the souls of mankind :
"He it is who sent among the unlettered ones a Messenger from among themselves, reciting to them His ayaat, purifying them, and teaching them the Book and the Hikmah, while before they had been in error."
[Al-Jumu'ah 62:2]