This is recorded no less than 15 times in the Old Testament (Gen 6:6; Exod 32:14; 1 Sam 15:35; Jon 3:10). God’s unchanging holiness requires him to treat the wicked differently from the righteous. When the righteous become wicked, his treatment of them must change. The sun is not fickle or partial because it melts the wax but hardens the clay. The change is not in the sun but in the objects it shines upon.
The bottom line application to this attribute is precious indeed:
Question: How can we be assured that Jesus still saves lost people and strengthens and comforts saved people?
Answer: Because he once did, and he never changes!