Quoting one of important Hadith in his famous book "an exposition on Forty Hadiths, Imam Khomeini explains as following
Al-Kulayni reports with his chain of authorities from Muhammad ibn al Rayyan ibn al-Salt, who narrates in a marfu’ tradition from Abu ‘Abd Allah (A) that he said:
The Commander of the Faithful (A) often used to say in his sermons, “O people! Take care of your creed (din)! Take care of your creed! For a vice committed in it is better than a virtue performed outside it. The vice committed in it is forgiven, and the virtue performed without it is not accepted.”
This noble tradition and others like it, whose aim is to exhort people to follow the right religion, imply that the vices of the faithful and the followers of the true religion are ultimately pardoned, as God says:
Verily, God would pardon all sins. (39:53)
It is on this basis that it may be said that their vices are better than the virtues of others, which are never accepted (by God). Perhaps, acts of virtue which lack the conditions of acceptance, such as faith (iman) and wilayah, possess a greater darkness. In brief, this tradition does not imply that the faithful are quit of their vices.
One of them is the famous tradition which is said to be welt-known (mashhur) amongst both the groups (i.e. the Shi’ah and the Sunnis):
The love of ‘Ali is a virtue by whose side no sin is harmful, and his enmity is a vice with which no virtue is of any benefit.
This noble tradition is similar to the hadith mentioned earlier concerning faith (iman). Its meaning is either in accordance with the probability suggested by marhum Majlisi, that the meaning of ‘harm’ is eternal confinement in hell or entry into it.
That is, the love of that master is the essence of faith, its perfection and completion, which results in one’s being rescued from hell with the means of the intercession of the Intercessors.
This interpretation, as pointed our earlier, does not preclude one’s having to undergo the various torments of the Purgatory (Barzakh), as stated in a hadith where [the Imam] has said, “We shall intercede for you on the Day of Resurrection, but the care of your life in the Purgatory is up to yourselves.”
Or it means what we have mentioned, that the love of that master results in the emergence of a luminosity and faculty [of faith] in the heart that prompt one to refrain from sins. And should one become afflicted with sin on occasion, he would remedy it through repentance and penitence, not allowing the matter to get out of hand and not permitting the carnal self to break loose its reins.
Moreover, there is a group of traditions that are cited under the following noble verse of the Surat al-Furqan:
[The servants of the All-merciful are those... ] who call not upon another god with God, nor slay the soul God has forbidden except by right, neither fornicate for whosoever does that shall meet the price of sin doubled shall be the chastisement for him on the Resurrection Day, and he shall dwell therein humbled, save him who repents, and believes, and does righteous work those, God shall change their evil deeds into good deeds, for God is ever All-forgiving, All-compassionate. (25:68-70)