After about 8,000 soldiers were captured, they were paroled and I assume sent back to England. What prevented the British from surrendering early, to prevent a devastating battlefield loss, and reneging on their surrender? I guess this goes for waving the white flag as well and just continuing to fire. I assume it mostly has to do with etiquette but would love to know more.
To avoid future senseless slaughter. If you/your army were to pull a stunt like that, there would never be any quarter given to you/your army again. After that point, you had better never lose again or you would all be killed.
I'm sure it's beyond the simple logistics, practicality, and chivalry for soldiers to treat each other with some respect. A lot of fighting men do realize that their enemy is human so certain aspects of this system of surrendering comes from a sort of unwritten "code" or "guidelines" that we can see at various points in history. The Christmas Truce in WW1 comes readily to mind.
There have been some armies that essentially ran a policy of "no surrender/no quarter". The Japanese Imperial Army in WW2 and to a lesser extent the Mongol Horde come to mind. Additionally there have been instances where there is a dehumanizing aspect of the enemy that also leads to "atrocities" and "massacres" that we also see through history.
So long story short, it relies heavily on a sort of "soldier's code of conduct".