Reference: Shaykh Ibn ‘Uthaymeen – Kitaabul-‘Ilm
The Shaykh (rahima-hullaah) mentions:
There is no doubt, the more a person increases in knowledge, naturally he increases in learning and differentiating the truth from the falsehood, and the harmful from the beneficial, and like this he reaches a level whereby Allaah bestows understanding upon him.
This is because taqwaa is a means for strengthening understanding, and strong understanding assists in increasing knowledge.
So you see two men memorising an aayah from the Book of Allaah, one of them can extract from it three rulings, whilst the other is able to extract more than this, according to that which Allaah has blessed him with in understanding.