The concept of purifying one's self of sin by doing good deeds is an important part of Islamic belief, but it is derived from Zoroastrianism.
It was not taught by the prophets, or Yahweh.
Vendidad 10:19
'Make thy own self pure, O righteous man! any one in the world here below can win purity for his own self, namely, when he cleanses his own self with good thoughts, words, and deeds.
Nam Stayishn 6
6. O righteous one, according to your will, I shall accomplish to the extent of my power, your worship with good thoughts, good words, and good deeds. I shall open for myself the brilliant way of paradise so that the grievous punishment of hell may not be inflicted on me. I shall pass over the Chinwad bridge and attain to the abode of paradise which is very fragrant, all-embroidered, and of all happiness.
Vendidad 3:42.
'In the same way the Religion of Mazda, O Spitama Zarathushtra! cleanses the faithful from every evil thought, word, and deed, as a swift-rushing mighty wind cleanses the plain58.
'So let all the deeds he doeth be henceforth good, O Zarathushtra! a full atonement for his sin is effected by means of the Religion of Mazda.'
Denkard 5:2.
The man that in this world obtaineth salvation (from Hell), and in the next world a recompense for good deeds, and who in both the worlds secureth good name by the excellent means of performing the laborious (i.e. meritorious) work for Tane-pasin, is the obtainer of the best recompense, is everywhere held in noble estimation and respect, is devoid of any sinful resolve, and hath a longing for the doing of righteous deeds.
[35.10] Whoever desires honor, then to Allah belongs the honor wholly. To Him do ascendthe good words; and the good deeds, lift them up, and (as for) those who plan evil deeds, they shall have a severe chastisement; and (as for) their plan, it shall perish.
[2.25] And convey good news to those who believe and do good deeds, that they shall have gardens in which rivers flow; whenever they shall be given a portion of the fruit thereof, they shall say: This is what was given to us before; and they shall be given the like of it, and they shall have pure mates in them, and in them, they shall abide.
[2.82] And (as for) those who believe and do good deeds, these are the dwellers of the garden; in it they shall abide.
[5.9] Allah has promised to those who believe and do good deeds (that) they shall have forgiveness and a mighty reward.
[22.23] Surely Allah will make those who believe and do good deeds enter gardens beneath which rivers flow; they shall be adorned therein with bracelets of gold and (with) pearls, and their garments therein shall be of silk.
[40.40] Whoever does an evil, he shall not be recompensed (with aught) but the like of it, and whoever does good, whether male or female, and he is a believer, these shall enter the garden, in which they shall be given sustenance without measure.
Islam teaches what the Persians always believed, that humans earn salvation through works. Christianity is the only religion that teaches salvation is sfounf through grace alone by accepting Christ as our Lord and Savior. Islam is just another humanistic religion reflecting the thought of men.