Super Saiyan 3 is one of Dragon Ball Z's most iconic transformations, from Goku's scream-fest to Gotenks cheat coding his way into the form. However, unlike its predecessors, Super Saiyan 3 was not achieved in a moment of desperation in a final showdown with a villain. Rather, this form debuted right off the bat in the Buu Saga, as Goku had already unlocked the transformation during his time spent training in Other World. Given that Super Saiyan transformations usually require tremendous emotional distress, how did Goku manage it when he was already dead?
It's possible that Super Saiyan 3 is just too powerful a form for even the mightiest of Saiyans, considering even Goku couldn't achieve it until he was already dead. The energy drain from Super Saiyan 3 is so immense that it's almost unusable in combat. Living in Other World with a "dead" body frees the user from more intense physical drain, allowing them to wield greater power with less strain on the body. This was most likely the biggest factor in Goku's ability to reach Super Saiyan 2 and 3 through training rather than life and death battles.
However, as Kid Buu's attack on Other World demonstrates, the afterlife is not a place devoid of conflict. What's more, if someone who is already dead is killed again, they will cease to exist entirely, with no possibility of resurrection. While Other World doesn't technically have life and death stakes, it therefore has 'super-death' stakes. With dire consequences for being defeated still on the table, it stands to reason that Goku could have encountered some sort of crisis in Other World that pushed his power to new heights.
Despite being a non-canon film, Dragon Ball Z: Fusion Reborn is a good example of the type of catastrophe that could conceivably befall Other World. After all, Hell is surprisingly accessible from Other World, and strong warriors are routinely sent there to leash unruly evildoers, such as when Goku and Pikkon were dispatched to reign in Cell. In short, the supposedly peaceful afterlife certainly doesn't lack trouble. It would certainly be a more compelling battle with Goku's very existence at stake, rather than the minor setback that death typically represents in Dragon Ball.
Goku's time in Other World was only addressed in an anime-exclusive tournament fought for bragging rights among the Lower Kai, and for the right for the winner to train under Grand Kai. Considering this tournament is the only real event depicted in Other World, which Goku is even heard discussing in the Buu Saga, it seems unlikely that anything else noteworthy occurred during Goku's seven years there. In any case, based on how long it took him to power up against Majin Buu, it seems as though Goku had only very recently achieved Super Saiyan 3.
It's not really that surprising that Goku's power increased dramatically while he was dead, especially with no Chi-Chi around demanding that he get a job or any of his children in need of attention. Left to his own devices, Goku's obsession with nonstop training is almost certainly the reason he reached Super Saiyan 3 rather than any sort of crisis or trauma. Nonetheless, it's amusing to think that his training for Super Saiyan 3 would constantly be shaking Other World apart as it did Earth, possibly explaining why he was allowed to visit Earth in the first place -- just so everyone else could get a break from his screaming.