Yep. It makes everything better if done right.
Say you're the bully. You've probably grown up getting away with whatever you wanted and you've found sport in tormenting other kids. Getting your ass beat will directly teach you your consequences have actions. You're probably not going to risk getting pummeled again.
Say you're the bullied, you've taken this abuse and nobody will stand up for you no matter what evidence you have and who you take it to. Beating that bully's ass teaches you to stand up for yourself and helps with the victimization mindset. You also get a free vacation from school.