Every army has these type of units. Wehrmacht is no exception.
Units in the battle are given independence to operate the way they want I.e. retreat, surrender or die.
At Saraghai on Afghanistan border, Sikh soldiers, in all 28 of them decided not to surrender in 1897 but decided to die under overwhelming odds of ten thousand afghan tribesmen surrounding them. Same came true in 1962 when 122 soldiers of Mahar Regiment in Rejang La, Ladakh died including Major Shaitaan Singh against, again overwhelming odds of Chinese attack from three sides. They could have vacated the post but chose to die and not to let Chinese occupy the post. It came true again in 1971 when Major Kuldip Chandpuri decided not to vacate Longewala Post in Rajasthan against overwhelming odds of 45 tanks and regiment of Pakistani army surrounding them. His actions handed a major victory to India in 1971.
Indian Army has more heroes and traditions of the regiment follows them and surrender is rarely thought about unless their commander orders them in order to save lives.
Some ugly moments of surrender exist in Indian Army too I.e. Brigadier Dalvi at Thagla Ridge, in 1962 and some officers at SELA Battle also in 1962.
The worst are the Pakistanis, whose 95,000 soldiers under not so overwhelming odds decided to surrender in 1971 in Dhaka, Bangladesh. They could have kept the fight going for several months. They had supplies for that. Again in 1965 at Khemkaran, a Brigadier, four Colonels and huge number of Pakistani officers surrendered with brand new tanks, some of the tanks had their motor running when they surrendered. These blots do not speak of a highly professional army of Pakistan. They had been given overwhelming psychological advantage by the British masters, as they recruited Punjabi Musalman in preference. For them they were politically reliable. Moguls and other Muslim rulers of India did not recruit Punjabi Musalman, as they thought them more of looters than soldiers to fulfill Moghul king's agenda.