What do nations care about the cost of war, if by spending a few hundred millions in steel and gunpowder they can gain a thousand millions in diamonds and cocoa?

What do nations care about the cost of war, if by spending a few hundred millions in steel and gunpowder they can gain a thousand millions in diamonds and cocoa?