"If you want peace, prepare for war."
This roman proverb has survived the millenia most likely because of its counterintuitive formulation, but also because of the truth speaking from it. The reasoning behind it of course reappears in game theory. Its founders very much interested in the behavior of actors and the analysis of conflict after the horrors of the second world war and at the start of the cold war.
For any neutral observer and, I would content, for most actors directly involved in warfare it is absolutely obvious that war is a huge waste of everything: resources, lives, time, mental health.
But if one side does not prepare for war, the other side may be able to gain some payout from the war, maybe even enough to offset the costs of preparation.
So both sides need to prepare for war and communicate their preparedness for war to the other side - cue maneuvers, military demonstrations and parades and the publication of defense expenses. For the signal to be considered truthful it needs to be costly.
It is the chicken game, only both sides know that direct conflict is a stupid idea, so they communicate in order to not crash and still keep their preparedness up. But now both sides have invested resources in military buildup, a fact which resource-conscious parts within those sides see as a waste of resources instead of the comparatively cheap price of peace.
Wouldn't it be possible to realize some gain on these investments? is the dangerous question here - similar to cancelling a life insurance or taking out a mortgage on your home because one likes money more than illiquid assets.