Surely common sense would have dictated it was hopeless, and surrender would only have reduced the suffering. It must have been the memory of 1918 and the fear of being the general who stabbed the fatherland in the back again. Is this correct?
Hitler was a egomaniac and he decreed extreme resistance. This means that there was no possibility for soldiers to surrender: it was a crime against the Reich. It also meant that it was better to die than retreat.
By the final months of the war, SS patrols were with the troops at all times in order to prevent soldiers from surrendering, being ordered to shoot anyone willing to stop fighting. However, plenty of officials (like Erwin Rommel, for example), seeing that the war was lost, allowed the troops to retreat and surrender, hoping the war would end soon.