I’ll give you a hint: the hexagon-shaped relic Twilight Sparkle is activating is the “Hubstyle Zodiac Glyph” which plays a pretty big role in this story, which answers most of your questions on how or why Planet CD came to exist.
#MLTFDeusExAllspark