Bamidbar / Numbers 31:21
וַיֹּאמֶר אֶלְעָזָר הַכֹּהֵן אֶל־אַנְשֵׁי הַצָּבָא הַבָּאִים לַמִּלְחָמָה זֹאת חֻקַּת הַתּוֹרָה אֲשֶׁר־צִוָּה יְהוָה אֶת־מֹשֶׁה׃
And Elazar the kohen said to the men of war who went to the battle: "This is the statute of the Torah which the Eternal commanded Moshe:
Pshat פְּשָׁט
Why Elazar spoke
Rashi: Moshe (Moses) grew angry at the officers, and anger leads to error, so the laws of purging vessels were hidden from him. Chizkuni: the laws of the red heifer were given through Elazar (Eleazar), so he explained them, but for saying a law before his teacher he was punished. Sforno: "the statute of the Torah" is the law of the red heifer, purification on the third and seventh day.
How Rashi, Chizkuni, and Sforno explain it
Remez רֶמֶז
"The statute of the Torah" twice
Agra DeKala: both times the law of purification is said through Elazar (Eleazar). Purity is bound to "daat", knowledge, and Moshe (Moses) is the root of knowledge, so when he grew angry the law of purity left him. Kli Yakar: purification by the red heifer is like the whole Torah, holding a hidden wisdom that even Shlomo (Solomon) did not grasp.
How Agra DeKala and Kli Yakar explain it
Drash דְּרָשׁ
Moshe's three angers
Midrash Lekach Tov: Rabbi Elazar ben Azaryah counts three places where Moshe (Moses) grew angry and erred: with Aharon's sons, at the rock, and here with the officers. And why did Elazar (Eleazar) teach before him? Some say Moshe himself gave him leave, so the people would grow used to hearing him. Others say he gave the law in Moshe's name.
How Midrash Lekach Tov explain it
Sod סוֹד
A war against the teacher
Mei HaShiloach: after Moshe's (Moses') anger the people had an answer for him. But Moshe already stood wholly in the World to Come and could not forgive, so Elazar (Eleazar) hurried to hint to Israel not to answer back. The "battle" is the quarrel with Moshe. The law that even what is absorbed is forbidden teaches that hidden anger is forbidden too.
How Mei HaShiloach explain it