Excellence of developing understanding of religion
It is narrated on the authority of Hadhrat Mu’awiyah (May Allah be well pleased with him), he said that the Holy Prophet (Sallallahu alaihi wa sallam) said: The person whom Allah Most High desires to treat well, He grants him understanding of (the matters of) religion. I disburse and Allah Most High grants. (I relate the Hadith but Allah Most High grants the guidance to act on it and its understanding to whatever extent He desires).
Bukhari and Muslim have unanimously related this.
However one should be wary of acquiring this knowledge with the right intention.
It is narrated on the authority of Hadhrat Abu Hurairah (May Allah be well pleased with him), he says that the Holy Prophet (Sallallahu alaihi wa sallam) said: The first person who will be judged on the Day of Judgment will be a martyr. He will be brought before Allah Most High and he will be reminded of the bounties that were bestowed on him. He will acknowledge them all. He then will be asked: What did you do in lieu of all those favors? He will say: I fought for You until I was martyred. Allah Most High will say: You lie! You fought so that you may be called brave. Thus, you have been called brave. Then the decree will be given about him: You take him and fling him face first into hell.
The second person will be the one who sought knowledge and passed it on to others and recited the Holy Quran. He will be presented and Allah Most High will describe the favors bestowed on him. He will acknowledge them all. Allah Most High will ask: What did you do in lieu of these favors? He will say: I sought knowledge and taught it to others and recited the Holy Quran to seek Your pleasure. Allah Most High will say: You lie! In fact you sought knowledge so that people address you as a scholar and you recited the Holy Quran so that people address you as Qari. Thus, you have been addressed as such. Then the order will be given that he should be dragged face down and flung into hell.
The third person will be the one whom Allah Most High has granted affluence and has granted him all kinds of wealth. He will be brought. Allah Most High will remind him of the favors that He has bestowed on him. He will acknowledge them all. Allah Most High will then ask: What did you do with that wealth? That person will say: I spent it in every way that was pleasing to You. Allah Most High will say: You lie! In fact, you spent wealth so that others may call you generous and that you have been called. Then it will be ordered that he should be dragged face down and thrown into hell.
[Excerpted from Noor Ul Masabeeh, Vol. 1]