Imam explains the matter in his famous book of "an exposition on Forty Hadith" as following:
Then only man does not see anyone else as efficient in the realm of truth; he does not expect any rank, any distinction or riches from anybody else; he does not seek for honor and fame with the help of others; and his heart does not become hypocritical and profane.
Therefore, if you see that riya’ is stealing into your heart, you should realize that your heart has not really surrendered itself to reason, and faith has not illuminated your heart yet; for you consider others to be your God and see them as efficient agents in the world, and you do not trust Him, the only God; it means that you have joined the company of hypocrites, polytheists and idolaters.