The previous lesson included a warning about excessive or unnecessary questioning. This report praises asking as a remedy for ignorance. The two ideas are not contradictory because the purpose and manner of questioning differ.
Useful inquiry seeks understanding needed for a real religious, educational, or practical matter.
Needless questioning repeats objections to confuse others, waste time, or prolong an argument without learning.
Asking a teacher for the meaning of a difficult Arabic expression is useful. Repeating the same question to obstruct the lesson after it has been answered is something different.