@sambucety rules in war is pretty much like what
@ReficuLSolbaiD said, things that is agreed upon because you dont want them done against yourself. Just like stuff such as having to declare war before attacking, and other similar stuff like not killing the messengers, the reason countries don't try to gain an "unfair" advantage (for those things where that makes sense, unlike the messenger thing) by doing them anyway is because is because they aim to Win, meaning they will persist and be inflicted with the consequences of other countries knowing they dont play by the rules anyway.
A losing side can however start doing such things as ruining the land before retreating from it (ie. poisoning wells), as they don't expect to survive anyway, and want to inflict anything they can out of sheer spite. Had they any chance to win or ever regaining the territory, then that would obviously be something they wouldn't do, but if there can be no consequences?
Then there is also the few rules that are only there because of "suffering", stuff like those knives that are intended to inflict painful injuries that kill slowly rather than outright kill, or various chemical weapons. Things where a
country has no reason to fear it being used against them but simply doesn't want it done anyway, because of sheer goodwill (maybe those decisionmakers had seen enough pain on the battlefield already to want some change for things that doesn't affect their win-chances either way? Or maybe it is out of moral reasons - as in, the stat that if it goes too low then people desert)