Imam Khomeini in his famous book "an exposition on Forty Hadith" has undertaken very useful discussions in this regard as following:
This wretched fellow without possessing enough knowledge of religion or sciences is sinful of doing something, which is against the scripture of God and the teachings of His Prophet (S).
Yet he moulds his ideas into the form of religion; though the conduct and behavior of all the great scholars of every generation was unlike this.
Each one of the branches of religious sciences demands the scholars who are associated with it to be humble, and requires them to obliterate all signs of pride from their hearts.
None of the sciences gives rise to pride and none of them is against humility. Later I will explain the causes behind this sharp contrast between their knowledge and behavior.
Also among the experts of other sciences, like medicine, mathematics, physics, engineering, industrial crafts, etc., the instances of pride and arrogance are seen. They underestimate all other sciences however important they may be, and scorn the scientists belonging to them. Each one of them believes that whatever he knows is the real knowledge.
They scorn people in their hearts, as well as manifest it in their demeanor; whereas their knowledge does not require this.
Some others who do not belong to any of the branches of science, like the people devoted to prayers and other devotional rites, also tend to behave high-handedly with others.
They disdain people and treat them with contempt, and do not consider even great scholars as worthy of redemption. Whenever there is a discussion about knowledge, they point out that knowledge without action is useless. They give great importance to the little knowledge that they themselves possess and view all others with ‘ujb and haughty contempt, forgetting that if their worship were true and sincere it would have reformed them.
The prayer forbids one from performing indecent deeds and sins and is considered as the culmination of a Muslim’s attainment (mi’raj al-mu’min), Imam further explained.
But such a person, even after performing the salat for fifty years and meticulously performing all obligatory (wajibat) and recommended (mustahabbat) religious duties, is immersed in the vice of pride which is a kind of apostasy-from head to toe, and is afflicted with ‘ujb-which is uglier than any other indecency-and comes to resemble Satan and acquires his attributes.