Purpose of obtaining knowledge
Any deed of a Momin (believer) are acceptable in the court of Allah only when it is done absolutely for the sake of Allah because deeds are based on their intent.
The reward is as per the intention. In the same way, the purpose of acquiring knowledge must be to gain the pleasure and approval of Allah and His Prophet (Sallallahu alaihi wa sallam) and that we will act upon our knowledge and convey the same to others. We will spread the message of truth and make all efforts to end falsehood in a civilized manner.
Whether it is the religious sciences or the modern sciences, along with serving the creation, the aim is realization of Allah. Allah says in the Holy Quran:
Know then that there is no God except Allah Ta'ala and (to offer worship and to educate the Ummah {community}). Surah Muhammad (47:19)
Further Almighty Allah says:
Translation: So, why should a party from within every group (or tribe) not go forth in order that they may acquire deeper knowledge (i.e. thorough understanding and insight) of Din (Religion), and warn their people when they return to them so that they may guard themselves (against a life of sins and disobedience). Surah Tawbah (09:122)
‘Allama Alusi (May Allah shower His mercy on him) says in the interpretation of the aforementioned verse of the Holy Quran:
Translation: The fundamental motive of a teacher should be to show the path of guidance to the student, to warn him against wrong beliefs and bad deeds and the ultimate of a student should be to be conscious of Allah at all times. The student’s aim should neither be fun and frolic nor pride. (Ruhul Ma’ani, Surah Tawbah, 09:122)
The first and foremost purpose of obtaining knowledge should be to instill fear and consciousness of Allah in one’s heart. Almighty Allah says:
Translation: So only those of His servants who have knowledge (of these realities with a vision and outlook) fear Him. (Surah Fatir: 35:28)
A learner (student) should not seek popularity or honor nor should there be any deplorable objective behind it. The Holy Prophet (Sallallahu alaihi wa sallam) has prohibited seeking knowledge for deplorable aims. There is a Hadith in Jame’ Tirmidhi:
Translation: It has been narrated on the authority of Hadhrat Ka’ab bin Malik (May Allah be well pleased with him), he said: I have heard the Holy Prophet (Sallallahu alaihi wa sallam) say: Whosoever obtains knowledge with the purpose of competing with the scholars through it or to quarrel with the ignorant or to garner attention towards himself with it, then Allah will cast such a person into hell. (Jame’ Tirmidhi, Hadith No: 2866)