Bnonn has an interesting interpretation of the 2nd commandment:
The gist of his argument is that pagans used idols as a form of sympathetic magic.
Aside from the merits of that interpretation in its own right, it's striking to compare that interpretation with a related interpretation of the 3rd commandment:
There is a third way someone in the ancient world might have taken God's name in vain: by using it as a magical term to make a spell or incantation more potent. The Egyptians thought that there was great power in knowing a god's secret name; the goddess Isis in on myth gains power over Re by learning his secret name. Something like this may be occurring in Acts 19:13-16, where Jewish exorcists use the name of Jesus to try to gain control over demons. D. Garrett, A Commentary on Exodus (Kregel 2014), 477.
That would offer a unified interpretation of both commandments, based on a common principle: prohibiting various forms of witchcraft.
In the same vein, notice the link between sorcerers and idolaters in Rev 21:8.