----------------------------------------------------------
In the beginning, there was pretty much nothing but an immense sea of primordial ki. It was ruled by a being known as Akira Toriyama. Under him were four powerful Dragons (one named Polunga who ruled the East, one named Shenlong who ruled the north, and two unknown mysterious others), each with their own quadrant of the primordial ki to rule, and each with a Planet to call home within their respective quadrant of rule. One day, Toriyama instructs the Dragons to bring their powers together to create something entertaining for him, and they created the cosmos, which to the enjoyment of Toriyama's innuendo was spherical in nature.
The progenitor race of this ball were the Shinjin, and they worshiped the Dragons like gods. Eventually more races cropped up, and naturally followed suit. The Dragons could visit their subjects by entering the cosmos using a "Dragon Ball", an object created by concentrating a fraction of the lifeforce of senient being into a magical orb. Each Dragon had a favored race, and among their respective favored race a citizen was chosen from whose life force to create their Ball (spoiler alert, Polunga favored the Namekians
However, Evil Shinjin, many of whom devoted their lives to banditry, stole and abused the Balls as a means to force the Dragons into the cosmos. The Dragons were severely weakened from their nigh-omnipotent states when inside the cosmos, which enabled the Evil Shinjin to enslave them and abuse their magic with malicious intent. The Evil Shinjin began a rule of tyranny inside of the cosmos, gathering mass followings of other evil-hearted beings. Despite their efforts, the good-natured Shinjin were unable to successfully combat this.
A side-effect of exposure to the portal through which the Dragons pass when entering the cosmos is the slow corruption of their very being. As the Evil Shinjin abused the summoning of their former gods, the Dragons became corrupt and evil, even getting a power boost for some reason (the Dragons could return to normal if either they were killed, or if their thirst for destruction was quenched). They waged a war against the Evil Shinjin. Casualties on both sides were great, but the Evil Shinjin's most powerful were able to triumph, and slay the Evil Dragons. Despite being weakened inside of the mortal cosmos, the Dragons were immortal. When "slain", they were simply reborn and purified of their negative energy.
After their rebirth, the Dragons simply sealed the remaining Evil Shinjin within the lowest part of the cosmos, using a wall of nigh impenetrable ki. This realm was inhabited by demons, djinn, and other similarly vile creatures. Evil Shinjin born after this point would be immediately exiled to this realm. This seal was neither fool-proof nor permanent, however. Evil Shinjin with smaller ki could escape through gaps in the wall, and their former followers could summon them into the upper part of the cosmos by performing heinous rituals (the more heinous the ritual, the more powerful an Evil Shinjin could be summoned). In an effort to prevent such large scale cosmic chaos in the future, the Dragons then appointed certain Shinjin to the roles of Kaio and Kaioshin (by lottery of course, as it served to amuse their master, Toriyama), as a form of a ruling body for the cosmos. Each time Evil Shinjin would escape from the sealed realm, the Kaio and Kaioshin would defeat them. More often than not, the Evil Shinjin would be destroyed resulting from the confrontations; less often, they would escape, and inform their masters of the situation outside, resulting in the highest tiers of Evil Shinjin antithesizing the Kaio and Kaioshin by titling themselves Makaio and Makaioshin.
The Dragons could see into the sealed realm, and knew that the Makaioshin were amassing great power over the eons, and that before long, they would be able to escape. Their first measure to prepare for the Makaioshin's inevitable escape was to order Enma to grant the greatest non-evil martial artists bodies in afterlife, allowing them to train under the Kaio, and to build up an army over time. Their second measure was a test for living mortals: each Dragon took their respective Dragon Ball and split it into seven smaller ones, and scattered them across their favored race's planet, and offered a reward to those willing and able to gather them. To test the strength, willpower, and ingenuity of the mortals, a whole set of seven was needed to be gathered. To test the morals of the mortals, and to provide incentive for the mortals to subject themselves to the test, a reward in the form of wishes was offered to any who could gather an entire set. The Dragons knew of the potential for Negative Energy to buildup within them, and how catastrophic such an event could be, but they concluded that it would be a better option than allowing the cosmos to plunge into the destructive, chaotic hands of the Makaioshin. Those who could pass this test would be brought outside the cosmos to undergo very fruitful training with the Dragons themselves.
Of the many groups who followed the Evil Shinjin during their reign, one was a cult of Madoshi. After the Evil Shinjin were sealed, these Madoshi worshiped the Evil Shinjin, and summoned them on occasion. One such cult member was named Bibidi, and after being exiled from the cult, he performed a very bloody ritual in reverence to the Makaioshin as a means to attain great power, so that he may exact his revenge on the cult leaders. Buu's creation was the fruit of this labor, resulting from a sick joke played by the Makaioshin themselves. We all know how that went down.
Eventually, only Polunga's set of Balls remained, as the 3 other favored races ended up being wiped out by their respective Evil Dragons. When Polunga became Evil (resulting from an anonymous evil Super Namek abusing the Balls too much), a lone Namekian child escaped to Earth, and nearly all life on Namek was wiped out before Polunga's thirst for destruction was quenched. This child ended up creating a new set of Balls on Earth.
Fast forward to the end of GT. Shenlong had finally found a warrior worthy of training with the Dragons: Goku. After defeating the Evil Dragons, Shenlong took Goku outside of the cosmos to prepare for the impending threat.
----------------------------------
If anyone dares take the time to read this nonsense, please give your thoughts, criticisms, etc.