When the Law was first read to 21-year-old King Josiah, he tore his robes. This was considered an act of great anxiety and remorse. Now that King Josiah had God's Word, he wanted to know more about God. So some priests went to a prophetess. She declared that God would destroy Judah because of the country's disobedience. Yet God did not forget King Josiah's response to hearing His World. He told Josiah, "Because your heart was responsive and you humbled yourself before the LORD... your eyes will not see all the disaster I am going to bring on this place."
To put this story in modern terms, perhaps you have heard of the University of Southern California's legal problems. Four or five years ago, they broke several NCAA regulations. The NCAA found out this year, and placed sanctions on USC for the next four years. So why punish the students enrolled now instead of the students enrolled then? The previous students committed the wrong, so why leave them unpunished and punish the next generation of USC students?
Why didn't God punished King Josiah and Judah right away? Why punish the next generation?
Perhaps because God knew He could still use His people. Let's look at God's two options. One, he could wipe out Judah. That would be that. Two, he could delay the punishment. This would extend the lives on the current generation and allow another generation to rise up. If God went with option two, He could still use Judah for His glory and purposes. The second generation, then, would be obligated to follow God since they existed truly only because of God's mercy. They wouldn't exist if God hadn't taken mercy upon the previous generation. It would also give God more opportunities to grow closer to His people. It allowed more room for intimacy in His relationship with His people.
Maybe this is why God had mercy. Maybe because He knew that if He extended the punishment, a whole new generation would rise up, which whom He would woo and love. This is, after all, all God cares about. He only wants to love us, not destroy us. Maybe this is why God had mercy.