Some of the ancient text indicates that when goddess Sati was insulted by her father during the yagna, Shiva was furious. To indicate his anger to the earth, he took the role of Mahakal and did Tandav (furious dance type). Mahakal may be the identify provided to Lord Shiva thanks https://sanskrit-mantras16603.theideasblog.com/27153806/considerations-to-know-about-mahakal