If you're a soldier fighting an enemy that uses terrorist tactics, you're wounded yourself, probably fearful of your own life, in constant fear of bodies being trapped or other unlawful conduct, and you come across a guy that is obviously not dead, you don't know he is a prisoner already, you just had to re-take this mosque because they had been reportedly re-taken by insurgents. Surely you can see how easily a bad judgement call can be made in such circumstances.
I would say that just goes to show the immorality of war in general.
What happened? An innocent was shot. Why? Doubtlessly there are dozens of factors, as mentioned by DrEvil. What was the direct cause of these factors? War.
This incident is being emphasized because journalists see something that is unjust and wrong. Under the circumstances, however, the soldiers actions are understandable... which is exactly what makes those circumstances immoral.