One explanation is that Moses was being whispered about as lacking in backbone so he wanted to show that he was capable of strong action when necessary.
This incident reminded Chief Rabbi Louis Rabinowitz of South Africa about Sir Herbert Samuel, who when British High Commissioner in Mandatory Palestine was thought to be favouring the Arabs and offending his fellow Jews. Rabbi Rabinowitz said in a sermon that Dr Chaim Weizman might have found the explanation when he said about Samuel, “Poor man. He tries to be so straight that he bends backwards”.
It’s a problem with a modern resonance. Justice Richard Goldstone is an example. Though he later changed his mind, he was highly critical of Israel and seemed to be going out of his way to find fault with his fellow Jews, presumably in order to seem to be even-handed.
In a broader global context, the world’s media blithely treat perpetrators of terrorist acts as freedom fighters because they are afraid to be thought of as favouring the victims.
Even when the freedom and tolerance of America and the West are under threat, the media cannot allow people to think that they favour Americans.