2 Chronicles 12:7
And when the LORD saw that they humbled themselves, the word of the LORD came to Shemaiah, saying, They have humbled themselves; therefore I will not destroy them, but I will grant them some deliverance; and my wrath shall not be poured out upon Jerusalem by the hand of Shishak.
The humbling God saw was Rehoboam with Judah's leaders and people humbling themselves after Shishak's invasion, acknowledging that the Lord was righteous and recognizing His hand in the invasion. Because they humbled themselves in this way, He would not destroy them and would not pour out His full wrath upon Jerusalem by the hand of Shishak. The deliverance He granted in response was only partial, described as some deliverance rather than complete freedom.
Their humility did not remove all consequences, for Judah still remained subject to Egypt under Shishak. As part of that limited judgment, they lost the treasures of the temple and of the king's house. Being left subject served a disciplinary purpose, to teach the people the difference between serving the Lord and serving foreign earthly kingdoms.