Prophet Moses (peace be upon him) was a student of hidden knowledge at the school of the noble Khidr. He learned sciences and truths with which he had previously been entirely unfamiliar; in effect, a new chapter opened in the knowledge granted to Moses. Beside Khidr, Moses was not acting as a messenger of God, but as a student whose knowledge the Creator was expanding in this way. His inability to endure and remain patient limited the knowledge he gained; it did not diminish his rank as a prophet. Had he been patient, his scholarly stature would have risen.
Moses acted according to the knowledge granted to him, and beside Khidr became acquainted with Khidr’s knowledge. Khidr’s conduct did not accord with Moses’ understanding; through Khidr’s instruction, Moses encountered knowledge that surpassed his own.
Yunus 39: بَلْ كَذَّبُوا بِمَا لَمْ يُحِيطُوا بِعِلْمِهِ وَلَمَّا يَأْتِهِمْ تَأْوِيلُهُ كَذَٰلِكَ كَذَّبَ الَّذِينَ مِنْ قَبْلِهِمْ فَانْظُرْ كَيْفَ كَانَ عَاقِبَةُ الظَّالِمِينَ
“Rather, they denied what they had no knowledge of, and whose true meaning had not yet become clear to them. Those before them denied in the same way. So see what became of the wrongdoers.”
The outcome of the companionship of Moses and Khidr (peace be upon them both) affirmed this truth: behind every event in existence, great or small, lies an appropriate and acceptable interpretation.
Yusuf 76: ... نَرْفَعُ دَرَجَاتٍ مَنْ نَشَاءُ وَفَوْقَ كُلِّ ذِي عِلْمٍ عَلِيمٌ
“We raise in rank whom We will, and above everyone possessed of knowledge is One who knows more.”