You have asked a very perceptive question that explains the power that this short story has. The ending is certainly a definite sting in the tail - it shocks us and makes us sit up, especially as the last sentence is given a paragraph all to itself and is very short and precise:
Then the sniper turned over the dead body and looked into his brother's face.
Of course, the way that Liam O'Flaherty chose to end this excellent short story goes to the very heart of the theme or meaning of the tale. This story explains and describes first hand the tragedy and disaster civil war is, especially when it pits brother against brother and family against family. Key to how this theme is developed is how the ending is foreshadowed in the text. A vital part of the text for me is when the sniper is victorious and kills his opponent. We would expect him to be happy, yet this is how he responds:
The sniper looked at his enemy falling and he shuddered. The lust of battle died in him. He became bitten by remorse. The sweat stood out in beads on his forehead. Weakened by his wound and the long summer day of fasting and watching on the roof, he revolted from the sight of the shattered mass of his dead enemy. His teeth chattered, he began to gibber to himself, cursing the war, cursing himself, cursing everybody.
Given how he has just shown his ingenuity in triumphing over his enemy this is a great surprise. It indicates that at least at some level the sniper has recognised how civil war brings death and destruction to everyone - not just the defeated but the "victors" too.
This short story is one of the best examples of an author bringing the reader in to a story. Good literature allows the reader to become a part of the story in order for the reader to understand the characters and how they feel. There is no need for the author to show the sniper's reaction because we can visualize it for ourselves. How would you feel if you just realized you had killed your brother? This is the same way the sniper feels. We know his depth of grief, guilt, and sadness because that is how we would feel. We're able to put ourselves in the sniper's shoes and understand what and how he feels. The ability to do this allows us to understand the universal theme of the story, the reason why the author writes it.