Bonzo dies because he’s an honorable guy. Well, at least, for a bully, he’s an honorable guy.
His full name is Bonito de Madrid and – yes – he’s from Spain, but that’s not really important. What is important is that he’s the very rigid commander of Salamander Army and he’s too rigid to see the opportunities in front of him. Instead of helping Ender, he tries to cut him out of the action. (Similarly, instead of being nice to Petra – the best sharpshooter in the army – he slaps her for talking out of turn.) Bonzo’s main setting is furious and his main object is Ender, who constantly demonstrates how much better he is than Bonzo at everything.
Bonzo and Ender have a few run-ins over the course of the book. But the main reason why we care about Bonzo is because he tries to kill Ender, and then Ender ends up killing him instead (though Ender doesn’t know it until much later).
As with the other bullies, Bonzo confronts Ender with a bunch of friends ready to fight too. But Ender convinces Bonzo to fight alone by using Bonzo’s “advanced case of Spanish honor” (according to Dink, 8.144). So what do we learn from this encounter? Always attack Ender in a group, no matter what he utters about “honor.” It’s the same mistake Stilson and his friends made.
But what we really learn from this encounter is that Ender will be ruthless and manipulative to ensure his own survival. Maybe Ender's right and he isn't so different from Peter after all.