Surrendering to an army might be smart. Surrendering to a small group of irregular weirdos isn't quite as smart. If you're a bunch of thieves, the punishment for you is probably going to be somewhere between cutting off your hands (on the merciful end) and execution. The thieves also know that they wouldn't hesitate to kill you if they capture you, so they expect the same in return.

Really, are those goblins willing to fight to death to protect the stupid almost worthless treasure they have? (Wich might contain magic weapons they didnt even used), or die to protect the pig they stole from the local farmers?
Some of them are.

Then again, there are traditions...