Your comment is right so let me expand on it if you don't mind.
Songs written and sung during a war are usually done to lift spirts to continue the war efforts. These songs will therefore celebrate important victories and keep up the spirits of those back home. The songs will contain patriotic overtones that will inspire troops to go into battle and encourage civilians to sign up for war.
It is doubtful that such songs will try to persuade foreign countries to get involved for sovereignty reasons and very unlikely that they will describe major military tactics so those do not fall into the hands of the enemy.