Good question. It appeals to a romanticized view of conflict in which honor plays a central role.
In medieval times, archers were looked down upon by other combatants because theirs were range weapons, and crossbowmen were actually despised even by archers. The honorable way to kill an enemy was to put yourself within range of harm yourself.
Plains Indians garnered honor by touching their enemies with “coup sticks”, an otherwise pointless exercise that put the warrior at personal peril.
In modern warfare, that element of personal risk doesn’t count for much. We routinely attack from halfway around the world, and even make rifles that shoot around corners. This is not to say that guys aren’t out there putting themselves at risk, just that that’s seen as a problem to be minimized now, rather than the main point.
But we still want to think of war as being governed by a code of honor, otherwise its horror would be unredeemed by even a pretense of virtue. So each side of the conflict tries to claim the moral high ground by crying foul when the enemy won’t meet them on their terms.