What is the purpose of war

What are the objectives and purposes of war? Are these objectives and purposes achieved?. Do the ends justify the means?