"Because screw them, that's why"
This question reminds me of a certain series I've read, and it explained the reason well: the mighty gods don't solve the problem l.... (drum rolls) because they don't want to. They want the war to keep going and their intervention is in fact the very reason it keeps going.
Yep, that's it,and it also explains a lot of things that don't quite add up in the classic "race A and race B have been at war for centuries and only the hero can defeat the big bad" cliche such as:
-how come race 1 and race 2 have been fighting for literal centuries in an active war but neither ever manages to shift the tides of the war on their own? Usually the only moment the hero comes by is when (insert bad guy race) suddenly became a lot more competent because a new bad guy rose to power or some other mighty weapon. Doesn't sound that unbelievable, until you start to wonder how in no other time in all of those centuries of war no other leader from each side has ever managed to tip the balance and outperform the enemy.
-in many stories the members of the "bad" race (and at times the members of the "good" race) are as 3 dimensional as a planisphere. They hate the summoned hero's team for existing and are hated back in return, and at no point whatsoever do the leaders of either side ever (safe for rare exceptions) seem to question this hate or whether keeping this war going is more beneficial than simply using diplomacy.
-wars are expensive and we've seen how wars at a roughly global scale can severely affect the economy of participating countries, especially if the war lasts several years, let alone several decades. Despite this, all sides don't ever seem fazed by the costs of maintaining a war over literal centuries. Corporations may rule the world to an extent but I find it doubtful that the industry of war is so profitable that both sides would be eager to keep killing each other for several centuries instead of simply trading with each other.
-the big bad has awoken and wants to conquer the world, and all of their minions are mind controlled so there's no talking things out: in such instances the hero team at the end of their journey is usually capable of wiping out entire armies on their own, usually thanks to the divine blessing they have. The idea looks fantastic, until you start to wonder how no one can become as strong as the big bad even if they're both from the same world. If they can't get as strong and the big bad is about as strong as the summoned hero, doesn't that mean that the big bad also plays by the rules of summoned warriors? If that's the case then who summoned the big bad? Why Is it that they can have the ability to be brought back after dying by his own followers every couple years after being defeated when sometimes not even the max levels summoned heroes have this ability?
That's right, the gods are incredibly powerful, incredibly ancient beings that created the world, but these gods aren't morally perfect and created the world solely to entertain themselves so they don't spend eternity doing nothing. They are the reason no one seems to question their situation. They're the reason different races will fight for centuries without ever getting tired of living in a state of war. As for why would they summon a hero? Because unlike the rest of the pieces in their war game, this one is a lot less limited by their control, they're unpredictable, they're free and they can reshape the course of the war in ways the gods wouldn't predict at first.
If you think that's absurd, then explain to me: what is the dungeon master in the world of a dnd campaign? We know the players are characters going through adventures, but the DM is essentially a God, creating and reshaping the world so everyone can have an adventure, and the story will continue so long as everyone is having fun, regardless how many enemies get killed or how much blood is shed throughout it (hell, sometimes certain players will murder innocent people for "the fun of it" or by accident and just pretend it didn't happen later). The only difference between the relationship between a DM and their players and the Gods and their summoned heroes is that the players are more or less in the same level as the DM, since even if the DM is extremely important, dnd requires more than the DM to be played. Unlike dnd, if the summoned hero refuses to play along, the gods can just kill them and summon another one.