2 Kings 17:7 All this took place because the Israelites had sinned against the Lord their God, who had brought them up out of Egypt from under the power of Pharaoh king of Egypt. They worshipped other gods
We see how Israel sinned many times over many years and how God got angry, not because they did little things wrong but because they were worshipping other gods.
But every time God was angry, He was also setting time aside to wait for them to return to Him.
God faithfully kept His promise to them no matter what happened even when they worshipped other gods.
That is the measure of God’s love for us!