Yeah, I always thought that the tacit acknowledgement of the existence of other gods was odd. It shows that whoever wrote that fully believed that other nations were worshiping entities that were gods in their own right, but yahweh was just better or something. It's interesting that christians today now accept that not only should they not worship those gods, but those gods don't even exist. Now that we understand fertility, weather, etc, there's no need for those other specific gods but we as a culture haven't managed to share the swiss army knife god yahweh, even though he apparently fully believed in those other gods.
What about the last Commandment something about not boiling a baby goat in its mothers milk?? What the hell?
That's not one of the 10 but it's actually pretty applicable to the topic at hand - my understanding is that this was a specific prohibition on a common pagan fertility ritual in which they would take an infant goat and boil it in its mother's milk and then spread the result onto the fields to get good crops. Basically this was just another in a long string of "don't worship anyone else" type commands.
The other thing that's interesting about this one is that this one very specific command has now been morphed by strict jews into such absurdity like not having cheeseburgers or even going to extremes of having two sets of dishwashers and dishes/utensils so as not to allow something that's touched dairy also touch meat. It's interesting how religion seems to always snatch up as much control as it can over its adherents' day to day lives as a means of keeping them indoctrinated.