God uses this story to teach us that he is both a God of steadfast love and a God of righteous judgment. And therefore, we need to be sure that we get right with him. Repentance is how we do that.