Suriyanar koil is an ancient temple where the 9 planets worshipped shiva to get rid of their leprosy which was caused as they inadvertently granted a wish of kaalava munivar who was supposed to be getting that disease.
the navagrahams or 9 planets are known to give the results of one’s past deeds. the point here is even they have to abide by their own rules. what is sown is reaped.
one may ask , kaalava munivar got cured of his leprosy without undergoing it but it got transferred to the planets…