Imam Khomeini in his famous book of "Forty Hadith" explains the matter as following:
If one tries to read the book of his own heart, he will see that this law is written there. The sense of veneration and gratitude for the benefactors increases with the amount of benefaction, particularly if the benefactor’s generosity has no selfish motive. Greater the selfless generosity, greater is sense of gratitude. For example, compare the extent of veneration for one who presents you a horse with a selfish motive, with the respect you have for a person, who grants you a village of several hectares, without any inkling of selfish motives. If a doctor rescues you from the darkness of blindness, you naturally owe to him a lot of respect, and if someone saves you from the clutches of death, you owe him a lot more.
You yourselves reflect and estimate the seen and unseen favors bestowed on us by the Almighty, even a small fraction of which all men and the jinn cannot even provide us with. Take for instance the air we breathe day and night, upon which our existence as well as that of other living beings is dependent, nothing can remain alive even if it is taken off merely for a quarter of an hour. What a marvelous gift it is! If all men and the jinn of the world labor hard to contrive such a thing, they cannot do that. In the same way, try to recall other gifts of God also, like external bodily senses viz. sight, hearing, taste, smell and touch, etc., and inner faculties like thinking, imagination and reason, etc., each one of which carries unlimited benefits and which are granted to us by Our Lord. Besides these valuable gifts, there are several other gifts also.
Moreover, He has sent His messengers and prophets and His Books as well to show us which path is right and which one is wrong, which path leads us to Heaven or Hell. He fulfills all our needs in this world and the Hereafter, without having any need of our adoration. Observance of His commands, or transgressing them does not make any difference to Him, it is for the sake of our own benefit that He has enjoined good and forbidden indecencies. While remembering all these and various other favors, whose reckoning is beyond the powers of human beings, do we not see that respecting and obeying such a Benefactor is essential for us, or does our reason approve of the acts of violating His commands?
This is an evident fact that we respect great people and those older in age. This is also true that people respect the wealthy and powerful persons, and rulers and kings, since they are recognized as great. Can their greatness be matched with the grandeur and magnificence of that King of kings, in Whose kingdom this world of us is merely a particle of dust. He is the Creator and King of this vast cosmos, whose infiniteness cannot be measured or even conceived by human intellect, Imam further explains.
Human being, a creature crawling on one of the smallest planets miserably fails to grasp the extent of his own small world, whose sun cannot be compared with far greater suns of innumerable galaxies. Our solar system is nothing as compared to lesser several other solar systems, which still elude the keen eyes (and refined telescopes) of great explorers and investigators of the world. Is that Greatest of the great, who can know and cover not only minute details of these known worlds, but of many more unknown worlds, in a twinkling of an eye, is not venerable according to the dictates of reason, as well as in the light of the great book of nature?
If any one fails to do this, he ought to be extra watchful and careful, since God Almighty is present everywhere, and no odd corner of the world can delude his Omnipresent sight. Every living being is within the range of His view and all knowledge is in His infinite attendance, so never forget Him. A speck of penitence in one’s heart would not melt any person into water, and he would not fall to the ground. Therefore, my dear friend, remember God and remember all His favors and graces, and stop disobeying Him.
Overpower and subdue the satanic band in this great war, and convert the spheres of your mind into divine realm by driving out the satanic legions and inviting the divine hosts, so that God may succor and protect you in the dangers threatening to befall you in this battle. The battlefield, which is more immense than this one, is the scene of the battle (jihad) against thine own self, the invisible world of within and the second stage of this jihad. We shall deal with this subject afterwards. By the time, I remind you not to have any expectations from anyone but God. Except Him, the Almighty, nobody can help you. With all humility and with all the tears your eyes can offer (to wash your sins), pray to God and seek His assistance to emerge victorious in this crucial battle. wa innahu wali al-tawfiq.
Read more:
Imam Khomeini recommended believers to perform self refinement at early stages of life