If a person (or the people making up a state) wages war from the wrong motives they endanger their soul, because God will know that they've done wrong and will punish them appropriately.