Bnai Yisrael were about to receive the Torah from Moshe, but instead they strayed from the will of Hashem. After forty days, they began to worry and they created a new leader, the golden calf. Hashem commanded Moshe to descend from Har Sinai to establish order and eliminate corruption. On his way down, Moshe heard the shouts of the people who were celebrating with their new god. Yehoshua also heard these sounds and said, “Kol Milchama Bamachane,”“the sound of battle is in the camp” (32:17). In the next Pasuk, Moshe tells Yehoshua, “It is not the sound of victory, nor the sound of defeat: I hear the sound of distress.” What is strange about this story is the contrast between the sounds made and the sounds heard. If the people were celebrating, why did Yehoshua hear sounds of war, and why did Moshe hear sounds of distress?
There is a story about Rav Chaim of Sanz, who would test children on Mishna or Gemara and reward them with money and candy. Once a group of secular Jews thought they would trick Rav Chaim. They taught Gemara to a gentile and dressed him as a Chasidic child. He related the Gemara perfectly to Rav Chaim. Rav Chaim told this gentile that there are better ways to make money. The secularists asked Rav Chaim how he knew that this boy was not Jewish, and he responded that this boy learned the Gemara as if it was a burden to him, while the other boys had true joy and spirituality.
Moshe and Yehoshua knew the difference between true joy and confusion. Although it might have looked like a celebration, Moshe knew that there were no true sounds of joy. Those with insight can determine that sounds of fake joy and celebration are truly sounds of battle and distress.