I wouldn't describe Bart Simpson's behaviour as generally virtuous. This might seem like an obvious statement but I've been watching third season episodes of The Simpsons
lately and marvelling at how different it is from animated comedy to-day, even other shows from Matt Groening. There's plenty of examples of kids being cruel on new shows but there's generally a sense that the only difference between the kids and adults is physical height--I feel like writers have generally abandoned the attempt to realistically render kids in contrast to adults. Certainly, adults can be ridiculous, too, or flawed or immature. But there's a difference and you can see it in the 1992 episode "Bart the Lover".
After breaking a classroom fish tank with a yo-yo, Bart (Nancy Cartwright) is forced to stay after school, alone with his teacher, Mrs. Krabappel (Marcia Wallace). Parts of the episode are shone from Krabappel's point of view and we see her life's depressing, lonely, and difficult. Still, when there's an assembly so the kids can be sold on yo-yos, Krabappel points out to a colleague who questions the educational value of the presentation that it may be one of the few happy memories the kids have in adulthood. Krabappel's point of view may not be positive but she still thinks of what's good for the kids.
This isn't something Bart's old enough to understand. Like many kids his age, he sees his relationship with adults as adversarial. He hasn't accrued the emotional depth to see a bigger picture than the one in which parents and teachers are keeping him from playing outside. So when he finds out Krabappel has been soliciting romantic partners via singles ads, he has no scruple about posing as one and laughing at her as her hopes and affections increase for the fictional "Woodrow" he creates.
This is one of the reasons adults need to be in a position of power over children. I've long suspected many if not most anonymous internet trolls are teenagers, if not younger, posing as adults. Which is a tragedy for them as much as their victims. Bart eventually feels guilty about what he's done--the resolution of the episode is that he grows a little bit emotionally (however little progress he actually makes over the decades long series). But if there's never any consequences, it must be hard for consciences to fight for dominance in peoples' minds as they grow older. I imagine many people feel tied to things they've done and said years ago or have buried it psychologically without confronting what it means.
So much of what made the humour on The Simpsons
effective is how sharp it was on human nature. Even the way Lisa (Yeardley Smith) and her friend are awed by the silly yo-yo performance. Kids can be beguiled that easily.