Describe How War Promotes Peace?

So why is it then that the question “how does war promote peace? So one might say that disagreement led to war, then leading to compromise which then led to peace. That may answer the question as to how war promotes peace. All elements combined succeed in the promotion of peace through war, but along with peace must also come understanding.