Our noble Shaikh, the Qādi, Abdus-Salām Ibn Barjas Aal-ʿAbdul-Kareem (rahimahullāh) stated:
As for the Sunnah of the Messenger of Allāh ﷺ, then it is filled with praise for the scholars, and encouragement towards honouring and respecting them due to the tremendous knowledge they possess and the nobility of the knowledge with which they have been favoured. From that is what the two Shaikhs (al-Bukhārī and Muslim) narrated from Muʿāwiyah (رضي الله عنه), who said: I heard the Messenger of Allāh ﷺ say:
مَنْ يُرِدِ اللَّهُ بِهِ خَيْرًا يُفَقِّهْهُ فِي الدِّينِ
“Whomever Allāh intends good for, He grants him understanding (fiqh) of the Religion.”
Here, fiqh refers to knowledge that necessitates action. So the hadīth indicates that whoever Allāh, the Most High, intends good for, He grants him understanding of this Religion and facilitates it for him. This is the station of the scholars. The implication of the hadīth is that whoever Allāh, the Most High, does not intend good for, He does not grant him understanding of His Religion. This is something plainly observed, for whoever is not granted understanding of the Legislation of Allāh, the Mighty and Majestic, and knowledge of the rulings of his Religion, falls into mistakes and errors in many aspects of his worship and dealings.
As for the scholar, his worship and dealings are built upon the legislative proofs and the revealed texts, so he does not fall into deficiency except rarely, and no one is infallible from that, neither the scholars nor others besides them.
(Ref: Man hum al-ʿUlamāʾ, p.11)