Allow me to assume you are referring to classical Greek mythology (although the division could be applied to other mythologies.) Besides Zeus and Hera (the Uber-gods, the father and mother of the gods), the known universe was first split into three geographic parts—the sea, ruled by Poseidon, the land, ruled by Persephone, and the sky, ruled by Aether. But that is an oversimple division: one could also name Athena, Aphrodite, and Ares, as a trio dividing human impulses—Wisdom, Love, and War, respectively. In fact, your assumption—that there were three main gods, can itself be questioned. The actual answer has to do with the natural and automatic division of anything into three parts: Positive, negative, and “beyond good and evil” (as Rumi puts it). Anything can be divided into these three parts. Consider heaven, hell, and earth.