So When Maa Kali (a woman) got aggressive and violent she became a demon?
and Shiva without his feminine shakti aspect was a demon?
Neither Shakti nor Shiva are demons.
Kali was the another form of Durga (Parvati), Lord Shiva's wife. The story goes like this:
Lord Brahma granted the boon to Raktaveeja that for every drop of his blood that fell on ground hundreds of demons like him would be produced. Thus the only way of slaying Raktaveeja was by not allowing even a drop of his blood to fall on the ground. Thereby Kali pierced him with a spear and drank all his blood as it gushed out.
It was time for Kali to begin her victory dance among the demon corpses. By now She was drunk from Raktabija's blood and the effect it had on Her caused her to dance wildly. As She danced She threw Her head back and again filled the skies with her shrill cackling. Her terrible laughter drew the attention of the gods who then came to see the outcome of the battle. They watched as she weaved in and out between the bodies of the demons. As she went she snatched up tokens of victory. From the demon hands she created a belt and from their heads she fashioned a garland which she wore around her neck. Her dancing grew more and more frenzied as she slipped into a trance. Her feet pounded out destruction with each step upon the earth.
Soon the demon corpses were reduced to mush, yet Kali continued dancing. It seemed as though nothing would stop Her, and again the world was on the verge of collapse. Something had to be done, and soon. The gods begged Shiva to intervene and calm Kali before it was too late.
Shiva did not yet believe that the world would be destroyed. As Lord of the Dance, He himself was enjoying the fine display of dancing. He laughed and waved the other gods away. "Let Kali enjoy herself,"he said, "Her job was well done."
That was right before he was unseated by the thunderous pounding of Kali's dance. When he attempted to right himself, another foot step from the Devi sent him flying in the air. He then understood the full force of what was taking place. He hurried down to the other gods. They again beseeched him to do something.
Shiva called out to Kali, but She could not hear him, such was the fever that raced through Her. She continued pounding what was left of demon flesh into oblivion. She rattled her staff and shook her great head. Her hair whipped wildly about causing great winds to carry off a few of the gods that were near by. She turned about, and lifted her arms to the sky, laughing crazily all the while. Nothing could stop this display of raw energy.
Shiva called out again, but again His words went unheard. Finally in an act of complete desperation, Shiva threw Himself down beneath Her feet.
Kali continued her frenzied dancing, pounding the life out of her husband. It was a few moments more before She realized that it was indeed Her husband, Shiva, who lay flattened at Her feet. This quickly brought Her out of Her trance, and She was once more the calm Devi.