Probably because he had his own share of abuse as a kid:
“From 1929, when he was 13, Dahl attended Repton School in Derbyshire. Dahl disliked the hazing and described an environment of ritual cruelty and status domination, with younger boys having to act as personal servants for older boys, frequently subject to terrible beatings. His biographer Donald Sturrock described these violent experiences in Dahl's early life. Dahl expresses some of these darker experiences in his writings, which is also marked by his hatred of cruelty and corporal punishment.”
"Dahl expresses some of these darker experiences in his writings, which is also marked by his hatred of cruelty and corporal punishment."
It's interesting that in his children's books it seems he still believes in moral reformation through cruelty and corporal punishment, as he frequently has the underdog do cruel things under the guise of knocking the other person down a notch, or otherwise cowing them into improvement. He doesn't just present it as justice or revenge, but as a kind of education, and specifically it's okay if the victim doesn't understand why they are being punished or that it is punishment at all. (I'm thinking of Matilda, The Twits, George's Marvellous Medicine, Charlie and the Chocolate Factory, the BFG, and probably others)
I suppose it's no surprise that even when you hate your upbringing, it still becomes part of you and your moral vision of the world.
Getting revenge is something that almost everyone in those situations wants to do; it satisfies deeply. What you describe is by many people called "hitting back," which is hard to see as something negative, and definitely not equivalent to what he went through as a child.
"Bully beats victim," "Victim retaliates;" one is obviously less bad than the other. It's not like the victims in his story are hurting random, innocent people.
My point is that there's an underlying moral lesson to the bullying he received: the idea that the pain and abuse will lead to positive results in the child. And further that the abuse isn't just punishment, but that abuse itself can lead to virtue. That's why it's applied to every young boy systematically.
In his books Dahl doesn't just describe revenge, but describes it as a way to actually correct behavior, as a way for the universe to give the powerful a lesson. He's certainly turning around the power dynamic, but the moral justification for abuse remains intact.
It's interesting that the Wikipedia article on "fagging" — as the practice was known — paints a much rosier picture of the practice. When I grew up it was definitely presented as being demeaning and having no particular merits
“From 1929, when he was 13, Dahl attended Repton School in Derbyshire. Dahl disliked the hazing and described an environment of ritual cruelty and status domination, with younger boys having to act as personal servants for older boys, frequently subject to terrible beatings. His biographer Donald Sturrock described these violent experiences in Dahl's early life. Dahl expresses some of these darker experiences in his writings, which is also marked by his hatred of cruelty and corporal punishment.”
https://en.m.wikipedia.org/wiki/Roald_Dahl