Because when you wander into a bear's cave, you don't wave your genitals at the bear daring it to maul you. You put armor on and prepare for a fight first.
And all it cost them was a devastated Southern Hammerfell, and who knows how many casualties from Redguards and 'defenct' Legionnaires that were left in Hammerfell after they ceded at the expense of the Empire.
Well that and the mounting civilian deaths as the Dominion slaughtered anyone they could find that wasn't Dominion. I'm sure the common man had a stake in the war as well with the 'not dying' thing.
Had the War continued Cyrodiil wouldn't be the only one to suffer. Hammerfell and Skyrim would feel the brunt of a full Dominion attack, the kind that swept through Cyrodiil and took the Imperial city would be felt in other provinces, breaking the Empire. They wouldn't just lose face, they would lose everything.
But of course, that doesn't matter if only Cyrodiil suffers. What's a few million more dead Imperials?
Or they could bluff seeing as how the Empire has no idea what they have in reserve because the Blades that could have given them actual numbers are all dead. And the emperor had a choice: call that bluff and continue a war that almost saw the destruction of the Empire and the Dominion claiming Talos' throne, or sign a treaty that would give the Empire a fighting chance to strike back when they recovered. That includes High Rock, the one province that is still part of the Empire regardless of the Civil War's outcome.
That's the point of every treaty. That logic makes the Treaty of S'tros M'kai just as bad for the Redguards accepting it instead of pushing into Dominion land. Seeing as how they still have plenty of legion troops that the Empire 'disbanded' to keep it protected from the Dominion even after it seceded they would have the manpower.
How can the Legions still be ready for another war right after signing the Concordat? Did they take 0 casualties during the Great War? Did they just press gang every fighting man and woman in Cyrodiil into the legion? How could they recover that quickly?