Warning! Warning!
I dug into the Iliad only a few days ago; my answers may/will be shallow.
The gods enrich the story. The gods are, to me, the passions. And what country or kingdom gets into a passionless war?
How do you convince the regular troops to go to their destruction without the commands and requests of higher powers?
Even a secular state has higher powers to call on.
Gods always take to the battlefields, even now — flags and anthems and prayers are right there in the stew.
It’s hard to imagine a war, even a cold one, without the gods or whatever is used in their place.
I’ll jump back into this when deeper thoughts strike me.