Symbolism, Imagery, Allegory
In Chapter 8, God beams Zeke over to the Temple in Jerusalem and exposes him to Judah's idolatries in a vision:
Then he said to me, Mortal, dig through the wall; and when I dug through the wall, there was an entrance. He said to me, Go in, and see the vile abominations that they are committing here. So I went in and looked; there, portrayed on the wall all around, were all kinds of creeping things, and loathsome animals, and all the idols of the house of Israel. Before them stood seventy of the elders of the house of Israel, with Jaazaniah son of Shaphan standing among them. Each had his censer in his hand, and the fragrant cloud of incense was ascending. (8:8-11)
God goes on to show Ezekiel women who are worshipping the god Tammuz and people who are worshipping the sun and the "Image of Jealousy" (probably an image of the foxy female goddess, Asherah).
You might take this vision literally, assuming that everyone has their own weird idol closet, but you can also read it in a metaphorical way. That's probably closer to how it was intended to be read. Even though people are outwardly worshipping God, in their hearts and in their private lives they're worshipping other things, like riches or sex or pride. The secret rooms symbolize that hypocrisy—an inability to put the inner life in line with the outer life.