I think there's a rational explanation for making what I agree with you is a quite a wrong assessment.
First of all, modern armies are mass action: uniforms make the "other side" literally uniform and undifferentiated. The purpose is twofold: first so that your own troopers won't think rationally about what they are doing and will simply follow along with the crowd, whether the rule is "shoot", "dig a foxhole", "don't run away" or whatever. The second value is to dehumanise the enemy and increase the chance that violence will actually be done to him (this is why the officers were so unhappy with the Christmas Day football game between British and German troops in WWI).
This whole process appeared in the Nopoleonic->Prussian invention of mass warfare; until then it was a largely retail affair when you really figured if you needed to kill that other guy in front of you or not.
Second of all, and again this is a function of 20th century warfare, this process was amplified through mass propaganda to whole populations, again dehumanizing the enemy. It's own long topic so I"ll stop here.
I will say that these refusals are even harder, not easier, when you're in a group who can see you take action or not (as opposed to firing at a far-away enemy where your colleagues can't really see how well you're aiming).
So in other words: everybody on HN has been trained to think this way, and all active participants in WWII had been likewise trained to think this way of the "other side"