He accepts repentance from His servants, pardons evil acts, and knows what they do. (Surat ash-Shura, 42:25)
All human beings are very vulnerable, for we cannot survive unless all conditions essential for life are provided for us. And yet some people tend to grow insolent, arrogant, and ungrateful toward Allah, as the following verses indicate:
We offered the Trust to the heavens, Earth, and the mountains, but they refused to take it on and shrank from it. But man took it on. He is indeed wrongdoing and ignorant. (Surat al-Ahzab, 33:72)
Truly man is ungrateful to his Lord. (Surat al-‘Adiyat, 100:6)
Allah is fully aware of this inherent evil tendency. He knows that humanity is fallible, ignorant, and ungrateful, and yet He is always compassionate and merciful toward people. Out of His compassion, He showed humanity the way to salvation: repentance.
Allah gives all of us countless opportunities to purify ourselves through repentance. Regardless of what we have done or of our former ungratefulness, we can attain salvation if we are sincere, remain true to Allah, fear and are aware of Allah, and truly repent.
This attribute is a clear indication of Allah's compassion and mercy upon people. Allah, Who is not in need of anything,wouldn't have forgiven anyone if He willed. But out of His infinite compassion, He knew that people would need this compassion and mercy, and so gave the good news that He would accept the repentance of any sincere person. As the Qur'an states:
Do they not know that Allah accepts repentance from His servants and acknowledges their alms, and that Allah is the Ever-Returning, the Most Merciful? (Surat at-Tawba, 9:104)