Every major arc of Dragon Ball Z features the heroes reviving any civilians caught in the crossfire of their battles against the likes of Cell, Majin Buu, and so on. One major difference after the Buu Saga, however, is that they not only brought the civilians back but also had everyone's memories of the villain erased. This is strange, considering it was the only time large-scale memory erasure was used in the series.
With the Androids going on a massive rampage and Imperfect Cell physically absorbing just about any human he came into contact with, it's odd that the traumatic memories of those victims weren't tampered with. Surely being sucked up into a giant bug's tail and melded together with it would cause anyone some severe mental trauma. With Cell's body count being as high as it was, it would seem obvious that PTSD would have been at an all-time high when they revived everyone. Erasing memories would have been better for everyone involved -- except for Hercule, who'd claimed credit for Cell's defeat.
After Buu's rampage is ended for good, the Z Fighters chose to erase the memories of everyone on Earth after Hercule requested for them to do so. He wanted his friend to have a chance at a new life, and since Hercule helped save the universe, the favor was granted. Because Good Buu still looked the same physically, everyone would have turned against him for the atrocities committed when the evil part was still inside him.
With everyone forgetting that Majin Buu committed a large-scale massacre, Good Buu could now begin living a peaceful life on Earth. He was shown to have compassion when befriending Hercule, so the potential for him to be good was always there. Had Hercule not made his request to the Z fighters -- and Shenron by extension -- Buu wouldn't have been allowed to live on Earth. But a closer look at the situation reveals an even bigger ripple effect.
Had the Z Fighters erased everyone's memories back during the Cell Saga, Hercule would never have gained the (increased) notoriety he did, and then wouldn't have been at the fight against Buu. He never would have befriended Buu, or asked to spare Buu's life and for everyone to forget the then-villain's actions. He also wouldn't have been able to help Goku and Vegeta later in Dragon Ball Super during their titanic fight against Moro.
Though it certainly would've been a kindness for the Z fighters to have Shenron alleviate earthlings' memories of Cell's atrocities, it's actually for the best that they didn't. Hercule, as egotistical and pompous as he can be, ultimately became one of the most important characters in Dragon Ball Z.