The Shiva Purana explains that though Shakti-Shiva are inseparable, they can appear to be separated in divine plays that perplex even saints. One such drama was designed by Bhagavan Shiva and his spouse, Devi Sati, to set the environment for Sati’s rebirth as Parvati. The divine plan started unfolding when Daksha allowed his intellect to abandon him and encouraged animosity for Shiva in his mind. In due course, he expelled Shiva, the Lord of all, from all yajnas through a curse  and chose to not invite Shiva in future celebrations arranged by him. When Sati visited Daksha, her father, and questioned him about his intentions, he insulted Shiva further, as a result of which Sati was deeply hurt. Because she no longer wished to be identified as the daughter of a person who was corrupt and devoid of Shiva’s bhakti, she renounced her body through the power of her yoga.
This incident infuriated Shiva, the eternally calm Lord, who then caused a divine being and Mahakali to appear from his hair and punish Daksha for his karma. Daksha and his army were destroyed, but they later regained their life when Shiva’s anger subsided. The eternal shakti of Shiva then waited for the right moment to incarnate on Earth as the daughter of the god of the Himalayas and marry Shiva once again.
Happy Maha Shivaratri!
 When Nandi felt hurt on Daksha’s behavior, Shiva explained to Nandi that he could never be cursed or expelled, for there was nothing in the universe except him — Shiva is the soul of all yajnas and everything else that exists.
Edited on May 24, 2019.