When they said to Moses Let us send men before us to scout the land (Num. 13:1), Moses began to wonder. He said: "Can I do anything before consulting the Holy One, blessed be He?" So he went and consulted Him. Moses said to God: "Your children are asking for such and such a thing." The Holy One, blessed be He, said to him: "This is not their first offence. While they were still in Egypt they jeered at Me," as it says, This was their derision in the land of Egypt (Hos. 7:16). "This is their usual way. I do not need to test them," for it is written, He knows what is in the darkness, and the light dwells with him (Dan. 2:22). The Holy One, blessed be He, said to him, "Moses, I know what they are, but since you have asked, Send men to scout the land on your own account." How do we know that this was so? Because it is in fact written, These are the names of the men that Moses sent to spy out (Num. 13:16).
Here is a lesson in letting people make their own mistakes.
God seems to know how it's going to end: go ahead, Moses, send men out to spy the land. I have no need to test them, but if you feel the need, then go for it. The fact that God knows it will end badly does not deter Him from letting Moses send the scouts. The need for Moses to learn in his own way trumps, apparently, the way the matter will end.
This is an interesting statement about how we interact with others, especially with others over whom we exercise power. Be it our children, our students, or our junior colleagues, sometimes knowing the right answer or having prior experience of how something is going to turn out is not what is important. Sometimes we must empower others to discover for themselves what we already know. God does not even say, "I told you so" (at least not in this midrash) when things turn out badly.
The gentleness of the exchange strikes me as a lesson to us all, that there are those in our lives who seek our advice or permission and that sometimes granting them permission to make mistakes is the holiest, most respectful, and most loving response.