As did the heathen; not only to the Lord, which was practised and tolerated sometimes in the kingdom of Judah; but also to the idols or Baals of the heathen. Whom the Lord carried away before them for the same sins; by whose example they should have taken warning. To provoke the Lord to anger, i.e. in despite and contempt of God, and his authority and command, as the next verse shows.
Related Commentaries of 2 Kings 17:11
2 Kings 17:11
11 And there they burnt incense in all the high places, as did the heathen whom the LORD carried away before them; and wrought wicked things to provoke the LORD to anger: