Eat too long of the Abyss, and the Abyss will eat something of you in turn. The Outer Planes bend all those who dwell there towards their alignments, even the gods. And so Rovagug became more than a combination of Evil destruction and Chaotic randomness. He began to seek out suffering, and as He devoured it He created more suffering in turn.
When mortal souls first came into Creation, Rovagug returned to the Material Plane. There was purpose to His movements now. Towards matter, rather than emptiness; towards greater meals, over small ones; towards the living, over the dead. Seven planets He ate before They could stop him, but they had only mindless animals and plants; and seeing only empty space left around Himself, and the next star system far away, He went back to the Abyss, through the rift the gods opened to entice Him. And though Desna grieved at the loss of seven worlds, the promise of the future cut too short, the other gods did not worry overmuch, and They let Him leave again.
More aeons passed, as Rovagug gnawed again at the Abyss.
When the War in Heaven grew hottest, and Asmodeus slew Ihys, Rovagug returned again. He ate the world where Ihys had died, and He ate the remains of a god with it. And then He turned to other worlds, worlds populated by mortals, and would not turn aside, not for the Maelstrom or the Abyss, not for any plane that the gods would rather sacrifice to Him.
They fought Him then, a desperate Last Alliance, Asmodeus and Desna and Sarenrae and Pharasma and Achaekek, and Lawful Good left without its leader; and They were joined by many of the younger gods, Calistria, Dou-Bral, Abadar, Gorum and Torag, Dahal and Apsu, Gozreh and Erastil.
Nothing They did could damage Him, for He ate all that They would attack Him with. He could be distracted, drawn to chase after Them and Their works; but always the gods would tire, and He would head again for the next mortal world. And when Achaekek in desperation sacrificed some of Himself to pull Rovagug away from a world, the remainder of Achaekek went mad; for Rovagug fed now not only on the works of the gods, but on their very selves: and He ate the very essence and values and minds of any Who ventured too close and did not know to protect Themselves in time.
In desperation, then, the gods built a prison to hold Him; a demiplane adjacent to Golarion, and a second adjacent only to the first. With sacrifice They lured Him inside the farther demiplane, and then they made the first impassable; pushing it out of adjancency using Dou-Bral's Star Towers, and giving it over wholly to Asmodeus's Tyranny, to own and fortify against interplanar travel; making it a Key to Rovagug's Prison.