Rabbi Levi said: Both Satan and Peninnah directed their intent for the sake of Heaven. Satan, so that no man should be considered righteous like Abraham [tested him for that purpose]. Peninnah, as it is written, "And her rival provoked her sorely, to make her fret" - in order to make her storm [against God, and thereby drive her to prayer]. When Rav Acha expounded this in Papunya, Satan arose and kissed his feet [in gratitude for defending his intent].
Satan and Peninnah Acted for the Sake of Heaven
Yalkut Shimoni on Nach 77:10
אמר ר' לוי שטן ופנינה לשם שמים נתכוונו. שטן כי היכי דלא ליהוי איניש עשיף כאברהם. פנינה דכתיב וכעסתה צרתה גם כעס בעבור הרעימה, דרשה רב אחא בפפוניא קם שטן נשקיה לכרעיה: