Surely you are the Mighty, the Wise.
Surely you are the Mighty, the Wise.” (Holy Qur’an, 40:7-9) “And those who call not with Allah upon any other god, slay not a soul which Allah has forbidden except for just cause, and do not commit fornication; for whoever does these shall receive (the recompense) of the sin. For him the punishment shall be doubled on the Resurrection Day, and therein he shall abide forever, disgraced.
Except him who repents and believes and does righteous deeds, for these are they of whom Allah changes their evil deeds into good deeds. And Allah is All-Forgiving, All-Merciful.” (Holy Qur’an, 25:68-70) On the one hand, Islam aims at the process of conformity between man's will and his activity; on the other hand, between the divine will of good and mercy.
It takes into consideration that the human ability, includes his psychological inclinations and limited bodily and mental ability and what he suffers of the division between the two ways in life; the way of good and evil, cannot always harmonize with the will of Allah, the Exalted, nor can he stand erect along a straight line without any regression or transgression and deviation because the nature of what he bears of capabilities, motives, and tendencies, is unable to be the true shadow on this land for the ultimate will of good and the greatness of mankind.
Concerning this concept, Imam Ja'far as-Sadiq (a.s.) says: “A believer looks like an ear (of wheat) which sometime rises straight up and sometimes inclines to itself.” It is inevitable for a believer to make mistakes now and then.” Therefore, Islam, as it legislates laws, regulations, and the rules of essential regularities for life, also takes into consideration the fact that there is not a perfect application and the occurrence of offense and deviation from righteousness exists, so it made, for this deviation and disobedience, a special solution and a comprehensive legislation for organizing it in order man return to the path of righteousness and coincide with the will of good and the great goal of this existence which is an integrative trend towards the public interest.
Accordingly, the Islamic legislation for repentance came to emphasize that man cannot be a volitional essence representing the wilt of good and ascend the ladders of perfectness without Allah's mercy and His opening the door of returning towards Him whenever he deviates or goes astray.