In punishment for Moses' outburst of anger God caused him to forget to communicate to the soldiers outside the camp the laws of purification. These were then announced by Eleazar, Aaron's son. It was not, however, proper for him to pronounce a law in the presence of his teacher Moses, and he was accordingly punished for his lack of reverence to his teacher Moses. God had previously said that whenever Joshua wanted to inquire of God, he was "to stand before Eleazar the priest, and inquire of him by judgement of the Urim and Tummin." But this did not come about. In all his long career, Joshua had no need of asking Eleazar's counsel, so that the latter lost the honor that had been intended from him.
Moses Forgets a Law in a Fit of Anger After Midian
Legends of the Jews 6:111