I think that the sniper comes to an epiphany about who he is and what purpose he serves in the world after he accomplishes his goal. Throughout the narrative, the sniper is singular in his focus about taking out his target. He raises himself "cautiously" and "hurriedly" inhales the smoke from his cigarette as he puts out the light. He forgoes eating and is sincerely excited about being a part of the machinery of war. His entire purpose in the first part of the narrative is to be an integral part of the machinery of death. The war machine is something that drives him and is something that fuels him. The sniper loves it and revels in it.
Then, the target is taken out. He utters a cry of joy in what he does. Yet, in being able to see the full implications of his actions, a reality awakens in the sniper that causes him to feel remorseful about what he has done:
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.
It is the realization that the sniper has become part of the machinery of war that makes him feel remorseful. He has realized that his only purpose in consciousness is that of negation. This fills him with shame. The suffering of injury, the excitement of the hit, and the reality that he has taken another life causes him to regret what he has done. The sniper comes to a realization about the nature of war and his part in it too late. It is for this reason that remorse is felt, and cursing everything related to the war becomes his only response.