In his commentary on 1&2 Kings, Peter Leithart makes the following observation in relation to 2 Kings 14, and the conflict between Amaziah, king of Judah, and Jehoash, king of Israel. I find it particularly challenging because you have to conclude that the Lord will even use the unrighteous to instruct the righteous. And that being true, healthy self-examination and a humbling of oneself before the Lord seems to be the right response of faith.
According to Deut. 28:7, those who keep covenant can expect victory in battle. Amaziah does right (2 Kgs. 14:3), while Jehoash does evil (13:11), yet when the two face each other in battle, evil defeats righteousness. Amaziah is a wise king who fears Yahweh, yet Jehoash is the one who tells a wisdom parable and gives sound counsel to his southern counterpart, warning that those who exalt themselves are debased (14:10). This chapter shows the same complexity of rewards and punishment that we find in other wisdom literature, most notably in Job and Ecclesiastes. Jesus was not the first to deny a one-to-one relation between righteousness and success (John 9:1-3). This is a constant theme of Scripture, and certainly by this point in 1-2 Kings, a reader will realize that God is not mechanical or predictable. Throughout the narrative, Yahweh has shown that he is free to show mercy where he pleases. He spares Ahab’s kingdom for a generation when Ahab repents, he extends life to Gentiles through the prophets Elijah and Elisha, he preserves and saves Israel despite its persistent idolatries. History does not falsify the promises of Deut. 28, but it does show the free sovereignty of Yahweh, especially his freedom to show mercy (239).