According to the legend, when Goddess Sri Kamakshi performed Thapas here in Maangaadu, Lord Shiva came down to earth to give dharshan to Her and then marry Her.
Later, Lord Shiva directed the Goddess to come to Kanchipuram and married her there.