The idolaters formed the idea that, just as one might need an intermediary to reach a great person, one would need intermediaries to approach Allah.
On that reasoning, they treated idols as a means of attaining nearness to Allah and began worshipping them.
This is an instance of inventing a comparison concerning Allah. A likeness devised by people does not have the same standing as an illustration given by Allah in revelation.