The Gita spends a considerable amount of time – the entire first chapter – ‘setting the scene’. Notably, this is in contrast to other important scriptures of similar gravitas like the Brahma Sutras or the Yoga Sutras which begin with rather abrupt statements announcing that the topic of the text will now be discussed; or the Upanishads which again, don’t consider it important to describe context or background.
In my view, the Gita deliberately takes pains to draw attention to the example and metaphor of battle, to later, show the opposite of it or the transcendence of it and expatiate on the attainment of absolute peace.