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.