On the authority of Zayd ibn Arqam radhiAllahu `anhu that the Messenger of Allah r used to say, "O Allah, I seek refuge in you from knowledge which does not benefit, from a heart which does not feel humble, from a soul that does not feel contended and from an invocation that is not answered." [Muslim]. Indeed the Prophet’s r seeking refuge from knowledge which doesn’t benefit comprises many things:
So look, for example at the books of Philosophy and those of the Ahl-ul-Kalaam. They have become prevalent and widespread even so far as being included into the syllabuses of institutions and universities. A student may waste most of his time trying to comprehend what an author intended, and once understood he feels no real gain from that, neither towards his religion, nor his life, nor towards his community or the Muslim Ummah.
A student spends years mastering various subjects, not having any affinity to the reality of life, nor bringing him any nearer to Allah.
How many biographies of unimportant, notorious characters are found, examinations are set about them and certificates are granted because of them. Their status is raised on an international level. This is on the one hand, while on the other hand we remain ignorant of the biographies of the Companions of the Messenger of Allah r. We are ignorant of the tafseer of even the shortest Chapters of the Qur’aan, ignorant of basic rulings of fiqh that everyone is required to know, and maybe people will treat greatly if I said: We are ignorant of many fundamentals of our `aqeedah.
Source: Al-Awaaisha, Husayn, Adorning Knowledge With Actions, Al-Hidaayah Publishing and Distribution, Birmingham, UK, 1999.