score:0
One of the reasons that God sent Israelites into exile is that they worshiped idols and false gods. In fact, if we read the prophets we find that the Israelites were already worshiping idols even in God's temple before they were exiled to Babylon. There's several things to take away from this point that help answer your question.
First, the Israelites were not any safer from idolatry in Jerusalem than they were in Babylon
Second, and because of the Israelites idolatry and violence God himself left the temple, which Ezekiel also describes in another passage
Third, God knew that a remnant of faithful Israelites such as Daniel would worship Him even in Babylon and would return to Jerusalem after 70 years. God in His wisdom used the exile to both punish the sins of Israel and to preserve a righteous remnant who would rebuild Jerusalem.
Ezekiel 8:9-18
And he said to me, “Go in and see the wicked and detestable things they are doing here.” 10 So I went in and looked, and I saw portrayed all over the walls all kinds of crawling things and unclean animals and all the idols of Israel. 11 In front of them stood seventy elders of Israel, and Jaazaniah son of Shaphan was standing among them. Each had a censer in his hand, and a fragrant cloud of incense was rising.
12 He said to me, “Son of man, have you seen what the elders of Israel are doing in the darkness, each at the shrine of his own idol? They say, ‘The Lord does not see us; the Lord has forsaken the land.’” 13 Again, he said, “You will see them doing things that are even more detestable.”
14 Then he brought me to the entrance of the north gate of the house of the Lord, and I saw women sitting there, mourning the god Tammuz. 15 He said to me, “Do you see this, son of man? You will see things that are even more detestable than this.”
16 He then brought me into the inner court of the house of the Lord, and there at the entrance to the temple, between the portico and the altar, were about twenty-five men. With their backs toward the temple of the Lord and their faces toward the east, they were bowing down to the sun in the east.
17 He said to me, “Have you seen this, son of man? Is it a trivial matter for the people of Judah to do the detestable things they are doing here? Must they also fill the land with violence and continually arouse my anger? Look at them putting the branch to their nose! 18 Therefore I will deal with them in anger; I will not look on them with pity or spare them. Although they shout in my ears, I will not listen to them.”