International humanitarian law proscribes certain actions in war, particularly actions that harm non-combatants. On a strict reading of these laws (see what Richard Goldstone said in his debate with Dore Gold at Brandeis University here and see what Matthew Yglesias had to say here), these actions are prohibited regardless of the justice of the war itself: there are certain things that you are just not allowed to do, no matter what. The natural response of any warring party accused of violating humanitarian law and confronted with this argument (aside from simply denying having done the things they are accused of doing) is to insist that their actions in the war cannot be judged outside the context that led to them going to war in the first place. They are the aggrieved party, they are in the right, and they did what they needed to do to defend themselves. Any law or law enforcer who fails to understand this critical distinction between the good guys and the bad guys is at best hopelessly naive and at worst actively evil.
What to make of this response? On the one hand, the position taken by Goldstone and Yglesias can't strictly be morally right. No one really believes that moral obligations in a war are completely independent of whatever caused the war in the first place. For example, it can't but be the case that the set of morally acceptable actions if you are defending yourself against annihilation is different from the set of morally acceptable actions if you (justifiably) take offensive action in response to some relatively minor provocation. (Which situations justify which actions is, of course, a hugely important question, but it is not the point here.) On the other hand, the whole point of constructing humanitarian law to be independent of the moral claims surrounding the war itself is that while there is at least one wrong side in every war, there is no real hope of getting the warring parties to agree on which side that is, so the only way for humanitarian law to make them behave any better is by side-stepping the whole issue of who's right and who's wrong.
So any sensible moral standard demands that the context be considered, but there is an excellent reason why the legal standard requires that it not be. What to do? Since requiring that the context be considered would pretty much be the end of humanitarian law, the question boils down to whether the benefits of a neutrally-administered humanitarian law are worth whatever injustice would be suffered by the occasional country that gets condemned for doing an illegal but morally justified act. I think it's clear that these benefits far outweigh the costs, but in any case that's the tradeoff.
P.S. Though I used Goldstone as the example to motivate the post, I deliberately stayed away from discussing the specific war that he was talking about. I don't think my views on that war can be inferred from what I wrote in the post, but in any case I would ask that folks not argue about them in the comments, not because it's not important, but because this isn't the right forum for it.
I absolutely agree with you if my own actions are the only ones I am taking into account, however I expect that the actions of others will better align with my goals if the standards are in place.
Given the high cost of implementing these standards, some level of proof (or at least a calculation of expected future utility) should be given as justification for their existence. I can think of two ways of examining this:
1) Compare the casualties (or other desired metrics) of similar conflicts before and after the implementation of standards and in situations in which standards were adhered to or ignored.
2) Try to quantify metrics of interest in a hypothetical war with or without adherence to the standards. This of course is very difficult, but I'm not willing to say impossible.
(1) doesn't really help us predict the effect of proposed new standards that have never been tried before, and that's what we really want to do. I hope we can find a way to achieve (2) :-)