What was Imam’s motive behind writing a commentary on Forty Hadith?

Imam Khomeini: I, a humble servant of God, was contemplating for some time, to select forty hadith from among the ahadith of the members of the Household of the Prophet (peace be upon them) from the authentic books of the companions, and scholars, and was trying to compile them with an appropriate explanation of each of them that can be applied to the general conditions of the people.

ID: 66913 | Date: 2020/11/23
Islamic scholars, motivated by a tradition from the Prophet Muhamma (PBUH), which promises Divine Rewards for scholars who collect forty traditions, compile hadith narrations in groups of forty. 


Imam Khomeini also describes purpose of the writing the book as following:


I, a humble servant of God, was contemplating for some time, to select forty hadith from among the ahadith of the members of the Household of the Prophet (peace be upon them) from the authentic books of the companions, and scholars, and was trying to compile them with an appropriate explanation of each of them that can be applied to the general conditions of the people.


I chose to write them in Persian, so that the Persian knowing people may also be benefited from them. God willing, this compilation would be an attempt to serve the command of the Prophet (peace be upon him) who said:


From among my followers, one who shall preserve and protect my forty ahadith, so that my people may be benefited from them, God Almighty will treat him on the Day of Resurrection with great men of wisdom and learning (jurisprudence).