Imam Ali (AS) narrated from the Prophet of Islam (PBUH) who said:
When Allah (SWT) grants knowledge to any person and that knowledge increase the love of the world for such a person, day by day that person will get away from God and the Divine Wrath will increase on that person [1]. The knowledge here refers to the religious sciences specifically, but can include the knowledge from other sciences as well; in these cases the knowledgeable person gets away more and more from God as the knowledge causes him/her to love the world (worldly possessions and other worldly matters) more and more. In addition, God’s Wrath for such scholars is mainly because; a learned/knowledgeable person must be a guide to others.
[1] Nawadir Rawandi, Page 157.
Source:en.shafaqna.com