Many of Dathomir's clan sisters broke with the teachings of the Book of Law. These Witches were cast into the wilderness, an ironic reflection of Allya's exile, to atone for their wrongdoing. After a period of three years, an offending Witch can petition for acceptance back into the clan, at which point the clan's council holds a hearing. The Clan Mother has final say, but most clans have accepted the suggestions of their sisters in recent generations.
For many generations, outcast clan sisters would spend their exile alone, reaching deep inside themselves to cleanse the dark cloud within, hoping to one day return to their clan. One such Witch, Gethzerion, never atoned for her cruelty; instead she reveled in evil. During her time in exile, Gethzerion spent years honing her shadowy craft. She discovered that she was able to cast spells without the aid of chanting and other more primitive rituals. Gethzerion used her newfound knowledge to gather the other outcasts. While the clans looked on, Gethzerion used her "Shadow Magic" to form the Nightsisters.
Gethzerion and her clan of Nightsisters quickly took over the Imperial prison that held the Empire's rogue scientists and designers. Using their Shadow Magic, the Nightsisters made the Imperials their slaves. Those that resisted were promptly disposed of.
The growing "dark energy" emerging from Dathomir did not go unnoticed. Emperor Palpatine felt the Nightsisters' presence and realized that if they were to escape Dathomir, they could become a threat to his power. He closed off all contact to the world, using atmospheric bombardment to destroy any space-going vessels on the planet.