It states (10:1-2) ִׁישא ֲבִיהוּאוַא ָבנָד ֲרֹןַהא בְנֵי ְ חוּוַיִּק 'ה ְנֵילִפ ֻתוּוַיָּמ ָםאוֹת ַלֹּאכוַת 'ה ְנֵיִלִּפמ ֵׁשא ֵאֵּצוַת ...ָּתוְֹתַחמ , "Aharon's sons, Nadav and Avihu, each took his pan, put fire in them, and placed incense upon it, and they brought before Hashem foreign fire, which He had not commanded them. And fire went forth from before Hashem and consumed them, and they died before Hashem." There are different explanations for why they deserved this punishment (see Rashi), but one reason was that everyone should see how cautious they must be with the kedushah of the Mishkan. Hashem had told Moshe that this would occur. As he said to Aharon (10:3) דִּבֶּר ֶרֲׁשא הוּאֵדֶכָּבא ָםָעה ָלכ ְּנֵיפ ַלוְע ֵׁשָּדֶקא ַיְרֹבבִּק ֵאמֹרל 'ה , "This is exactly as Hashem said, 'I will be sanctified through those near to Me'..." Rashi explains that Hashem wanted to punish ַיְרֹבבִּק, the tzaddikim, those who are close to Hashem, because ֵׁשָּדֶקא, that creates a greater kiddush Hashem. It will show that if tzaddikim are punished for an aveirah (such as the aveirah of not properly upholding the kedushah of the Mishkan), and their closeness to Hashem couldn’t protect them, certainly, this will be the fate of regular people who sin. Moshe said to Aharon, "Aharon, my brother! I knew this House was to be sanctified through the beloved ones of Hashem, but I thought it would be either through me or through you. Now I see that Nadav and Avihu are greater than us!”
The pasuk concludes, ֲרֹןַהא ַויִּדֹּם, "Aharon was silent." He didn't complain. He believed and trusted that Hashem was treating him justly, and that it was for the good. Some add that ַויִּדֹּם is from the word דומם, inanimate items. This describes how strong Aharon was. He didn't allow what occurred to his children to cause him to complain or question Hashem. He accepted Hashem's decree with emunah in Hashem.
Reb Yosef Shaul Nathanson zt'l (in his sefer Divrei Shaul) explains the words (ibid.) ֵׁשָּדֶקא ַיְרֹבבִּקֵדֶכָּבא ָםָעה ָלכ ְּנֵיפ ַלוְע , as follows: ַיְרֹבבִּק, the tzaddikim, who are close to Hashem, ֵׁשָּדֶקא they sanctify My name because of their high level of emunah, that they believe that even a tragedy such as this one is also from Hashem.
ָםָעה ָלכ ְּנֵיפ ַלוְע, but for average people,ֵדֶכָּבא, they find what occurred to be very heavy (כבידות)... They feel deep heaviness in their hearts. It is hard for them to believe that it was for the good.
It states (Tehillim 94:12) ּה"יָּ ֶנּוְּּרְּיַסת ֶרֲׁשא ֶרַגֶּבה ֵיְׁרַשאֶנּוְּּדַמְלת ְָךָתּוֹרִתוּמ , "Fortunate is the man whom You, Hashem, gives yesurim..." The Midrash (Tanchuma Ki Seitzei 2) states on this pasuk: "A person must be grateful to Hashem when he endures yesurim because the yesurim will draw him close to Hashem. As it states (Mishlei 3:12) ֶהיִרְצ בֵּן ֶתא ָבוּכְא ַיוֹכִיח 'ה ַבֱהיֶא ֶרֲׁשא ֶתא כי, "For Hashem chastens the one He loves, as a father placates a son."
The Midrash says that we can draw an analogy to when a king is angry at his grandchild, and someone restores peace between the two. Shouldn't the grandson be appreciative of the one who brought him back to the king? Similarly, if someone's child dies, r'l, he should express appreciation to Hashem because this child will bring him back to Hakadosh Baruch Hu, as it states כי ַיוֹכִיח 'ה ַבֱהיֶא ֶרֲׁשא ֶתא , "For Hashem chastens the one He loves..."