It once happened the great sage Shukracharya who was the guru for all the demon. Did a tremendous span of austerities in the worship of Shiva, and Shiva had to appear. When Shiva appeared he asked for immortality. Shiva refused him and said the one who takes birth has to die. So Shukracharya asked for the power of rejuvenation, that is he could heal any kind of wounds or disease. Shiva being the ultimate healer the master of all herbs and medicines gave Shukracharya the sanjivani mantra. The mantra that can heal anyone from any kind of wound or disease. Shiva gave him the sanjivani mantra which could heal any wound or disease.
The Demons became excessively bold and waged battle after battle. All the demons who fall in the battle with any kind of grievous Shukracharya would just revive them by using sanjivani mantra. The demons won every battle without losing a single person. Gods got very alarmed they felt this was an unfair battle as no matter how long they fought the demons never died but they died. They went to Brahma and asked for help.
Brahma intervened with Shiva and said you have given Shukracharya this kind of power you must kill hill. This will destroy the balance as the demons have an unfair advantage against the gods. Shiva said I will not kill him but I will contain him.
When the war was going on Shukracharya recited the Sanjivani mantra. In between came Kritika a Hideous looking ogress one of Shiva's female gana. She sucked up Shukracharya in her womb and the Sanjivani mantra became impotent. Brahma was amused and praised shiva for his wittiness. Shiva froze time for Shukracharya and re-established balance in the universe.
This is how Mahakala means the destroyer of all the bad has put an end to evil without even actually ending it. In real life also we should not kill or destroy evil but contain it for maintaining balance in life