In history, when most nations are faced with obvious military defeat, either the defeated's leaders call for an armistice/peace and end the war to prevent any further pointless deaths, or the army themselves desert or mutiny to force a surrender, as what happened in Germany during World War I.
So what kept the Wehrmacht fighting to the very end even when the situation was obviously hopeless? I know the party's inner circles secretly disobeyed Hitler such as Speer's refusal to execute the Nero decree, or even plotted against him to end the war such as the July 20th plot. But what kept German soldiers fighting all the way until even Berlin was a pile of rubble, rather than mutinying or deserting when defeat was obvious around the time the Soviets smashed Army Group Center in August of '44, or the failure of the Ardennes counteroffensive later that winter?
But what kept German soldiers fighting all the way until even Berlin was a pile of rubble, rather than mutinying or deserting when defeat was obvious around the time the Soviets smashed Army Group Center in August of '44, or the failure of the Ardennes counteroffensive later that winter?
Well, the Ardennes counteroffensive failed, but the fact that the Germans could muster such an offensive that late in the war and still cause serious concern on one front shows that the Germans themselves didn't think their forces were on the verge of imminent collapse and indeed still had strength left.
Let me give you something from a military perspective on warfare. Remember a couple things:
First, just because you're retreating on all fronts, doesn't mean defeat was obvious. You know the enemy doesn't have infinite troops and supplies (just as you don't), you're likely motivated to defend your homeland while their forces are farther and farther away from their own homes, and you the soldier assigned to a front may not have a full grasp on just how actually desperate the situation is.
How much knowledge would someone assigned to the Western Front have of how crushing their losses were on the Eastern Front? What awareness would, say, ground forces - who are being told to regroup to fight on better ground - have of the utter destruction of their naval forces and air forces?
As long as the chain of command remains intact, and you are getting communications and command & control from HQ, you're still given orders and thinking the war is being prosecuted. Meaning, you have a chance.
A historical example of this is the Persian Gulf War: why did Iraqi forces surrender en masse once the ground campaign started? Well, a month of constant airstrikes that decapitated command and control and left many units without guidance from above would leave troops wondering whether the war was even being prosecuted fully anymore. If you're not even sure your nation is intact anymore, what impetus do you have to keep fighting?
Second, those who do have the full picture - the leadership - are thinking far more political in nature. Remember, warfare ultimately supports some sort of political goal. In late 1944, just because you are losing a war doesn't mean you are guaranteed utter defeat and Berlin in rubble - you may start thinking that sure, the war is lost, but you can bleed the enemy enough or make yourself unappealing enough for an invader that they settle for a peace that doesn't involve the dismantling of your country and giving up your sovereignty.
You also see this all over history. A particularly pertinent example to today is the Korean War: the course of the war ebbed and flowed as the US/UN entered the fray and then China entered resulting in a stalemate. The US/UN ultimately felt that they had achieved their goal of defending South Korea and didn't want to escalate the war into China. On the other hand, China had supported North Korea and kept them from capitulating. In the end, both sides agreed to a cease fire and pulled their forces back, creating the situation we have today.
I do, however, want to point out one other thing now, from a historian's perspective:
The Wehrmacht DID start surrendering in larger numbers in late 1944/early 1945, but particularly so to the Western Allies, who treated POWs far better than the Soviets did.
In Eisenhower's Crusade in Europe, he stated that over 10,000 German POWs were taken by his forces per day in March of 1945. All told, over 300,000 German POWs were taken in March of 1945 alone to bring the total haul of German POWs to 1.3 million, and in April this was even more staggering: over 1.5 million more Germans surrendered to the Western Allies, the same month that nearly 100,000 German soldiers died resisting in the Battle of Berlin. By contrast, the Western Allies since D-Day suffered around 160,000 KIA and 70,000 captured
Using the Biennial Reports of the Chief of Staff of the United States Army to the Secretary of War, 1 July 1939 - 30 June 1945 by General of the Army George C. Marshall. PDF link here, note that this is an official army.mil link, some important points:
| Campaign | Battle Dead | Captured |
|---|---|---|
| Tunisia | 19,600 | 130,000 |
| Sicily | 5,000 | 7,100 |
| Italy | 86,000 | 357,089 |
| Western Front | 263,000 | 7,614,794 |
| --------- | ---------- | ---------- |
| Total | 373,600 | 8,108,983 |
Note that captured on Western Front includes 3,404,949 disarmed enemy forces after the unconditional surrender
Consider those numbers in this context:
| Front | Germans Killed | Germans Captured | Total |
|---|---|---|---|
| Eastern Front | 4,300,000 | 3,100,000 | 7,400,000 |
| Western Front | 370,000 | 8,100,000 | 8,470,000 |
German forces were far more likely to surrender to the Western Allies, and there are even cases of German troops fighting West to surrender to the Western Allies.
So consider that there were those who chose to take the chance to fight and possibly die rather than surrender and be guaranteed to be treated brutally, like those who surrendered at Stalingrad, of whom only a fraction returned years after the war ended.