I do believe there's a difference where the punishment comes from.
Aggressors[0] generally attack others one of or a combination of these reasons:
1) Pleasure/amusement/entertainment. Some people simply enjoy seeing others (everyone, specific subgroups or specific individuals) suffer.
2) Personal benefit/gain. Very often this is simply social status among peers. As aggressors grow, they refine these strategies (both consciously and unconsciously) to also gain social status in the eyes of people in positions of power (e.g. superiors/supervisors/managers), often with a resulting material benefit. Sometimes the material benefit is more direct - e.g. scammers.
A) If the punishment comes from people in positions of power:
With reason 1) it offsets the pleasure they get but quick corporal punishment is probably less effective than longer punishments such as exclusion from activities or having to perform laborious tasks.
However, with reason 2) any punishment, corporal or not, creates or reinforces a persecution complex (after all, they are just doing what they think everyone should be doing - climbing the social ladder) and often even helps them gain status because they are doing what their peers secretly also want to do - break the rules and stick it to the people in positions of power.
B) If the punishment comes from peers or especially the target, it defeats both reasons. Very few aggressors get pleasure from betting beat up by their target or other peers. And with reason 2 especially, they now risk losing social status if the target wins or it's a signal that this the behavior is not accepted by the group if it comes from peers.
The issue with B often is that to onlookers who don't know how it started, it looks like 2 people fighting, instead of one being the aggressor and the other being the target mounting a successful defense. But that can be solved through better education of people in positions of power.
What I find especially concerning are all these zero tolerance policies which actively encourage people to not defend others and sometimes even themselves.
[0]: I generally don't call them bullies because that conjures an image of children in a schoolyard but these people grow up to become adults and their behavior is driven by the same urges and incentives, it just manifests slightly differently. Being an aggressor is a mentality and a personality trait.
its bad science. I can name zero times when the victim reacting with aggression in an effective way (i.e. hurting or shaming the bully) did not result in better behavior from the aggressor in the following confrontations. I have worked with children and adolescents a lot of years and people standing up for themselves are usually better off.
Now, there are some side notes: the standing up must be timely and appropriate. The revenge shouldnt be served cold and the revenge shouldn't raise sympathy for the bully.