The Castle of the Two Sisters has a long history, dating back to Equestria's early beginnings. Back when Star Swirl still taught the ponies who would become the future rulers of Equestria.
In the present day, Star Swirl's research into dimensional theory has created connections between two worlds, and even helped facilitate cross-dimensional friendships.
But not all of his experiments were recovered or even recorded. And not all of them were considered dangerous enough to be destroyed.
[Human-kitsune transformation]