The corruptions of bullying are too well known to all of use from media and personal experience to need elaborating. Yet bullying as we know it seems first to be a product of the grade-segregated public schools, which many have suggested have highly artificial social characteristics, and second to be a product of social media, which we also know well to be unnaturally distorted social environments.
Is bullying merely a product of damaged environments as with hens in too confined spaces? Or is there a natural form of bullying that potentially has a genuine social role? The second option, as foreign as it is to our own experience and preconception, deserves consideration.
History has too many examples of of hostility to outsiders to excite our wonder, and when bullying is just hostility to outsiders it would not be unusual. More interesting is bullying within the group. Bullying within the group could sometimes be a competition for resources internally, just as bullying outside the group can probably be explained as driven at some psychological level as a competition for resources. Within the group, the competition could be directly over actual resources or over social status.
Against that form of bullying we can contrast bullying that is meant to strengthen the group. Let us continue to call it bullying though a better term should exist. In conditions of competition, a weak member of the group weakens the group. Bullying would then either strengthen the group in a ruthless way by driving the weak member out or strengthen the group in a positive way by spurring the weak member on to self improvement. Historically Anglo literature had a trope where eventually the bullied person turns on the bully and either earns either the respect of the bully himself or of the larger group of whom the bully is a lower-status member. This trope appears to be a form of group-strengthening bullying.

This illustration comes from the book Farmer Boy, where the teacher has to prove himself against bullies.