In these passages is the account of King Jehoram, the son of Ahab allying himself with Judah’s King Jehoshaphat and the king of Edom to war against the king of Moab. Before going into battle, they inquired of Elisha the Prophet of God at the request of Jehoshaphat.
Elisha respected King Jehoshaphat but not Jehoram, who worshiped idols and led Israel astray. Elisha told them that God would give them victory over Moab, and they did have victory.
After Israel had defeated Moab and destroyed their cities, the king of Moab in desperation sacrificed his son to the demonic world. After he did that, ‘there came great wrath against Israel, and they departed from him and returned to their own land.’
I believe that God allowed great wrath to come on Israel to punish them for their unfaithfulness. God uses many things to accomplish His purposes, even the demonic world. God is all-powerful and is in control of everything. Praise God!