It's just human psychology. The Germans, when they lost, also committed atrocities with those captured by the Russians, brutally killing nurses behind Soviet lines.Rationally its imperative for the Palestinian side to never target civilians, it doesn't help them in anyway whatsoever. It doesn't contribute to any tactical advantage and at the same time it works to galvanise the enemies of Palestine.
The mass indiscriminate execution of the festival attendees was absolute ISIS/IDF style madness. Then parading the corpses around in Gaza chanting god is great is self defeatist, not just for palastine but for Islam itself. Why make it so easy for the enemies of Palestine to propagandise this war against Palestine?
You know every time a video comes out showing the IDF behaving like absolute savages it only works to the benefit of Palestine. The counter is true also, but the difference is the Israelis have plenty of global media to push their narrative, the Palestinians don't. So if the Palestinians commit 1 crime its portrayed like they committed a thousand and if the IDF commit a thousand crimes its as if they only committed one. Such is the nature of war when side has a massive advantage over the other. Which means the Palestinians must be more vigilant.
Pretty much everyone knows that the weight of violence is about 98% against the Palestinians and the 2% from the Palestinian side is pure retaliation.
Had Palestinians just targetted the isreali army, i suspect most of the world would just see this as self defence, arabs fighting against their jewish colonisers. But you give the enemy just one video of brutality and it will be used dehumanise your entire cause, which is to remove the oppressors boot from your neck.
That is, they take out their anger and fear in front of a strong enemy. It is possible that these are ancient instincts of people when they lived in the wild, when weak people had to fight powerful predators.