I'm also interested in answers to this. I'm not a scholar, but I wonder if it has anything to do with Yom Kippur and the ritual of the scapegoat as portrayed in Leviticus 16. The Hebrew in that passage describes an offering of two goats, they draw lots to choose which one will be sacrificed and which one goes into the desert:
"But the goat on which the lot 'for Azazel' has fallen, will be placed alive before Yahweh, for the rite of expiation to be performed with it, and for it then to be sent to Azazel in the desert." -Leviticus 16:10
The notes in the New Jerusalem Bible (1990) say:
"Azazel...was the name of a demon, who. The ancient Hebrews and Canaanites believed to live in the desert, the barren region where God did not exert his life-giving activity...the scapegoat was not sacrificed to Azazel but carried away the people's guilt to the demon's desolate haunts...in this way an ancient popular custom was taken over and purged of demonolatry."
Based on this I wonder if the association of goats and demons is very old, and what/if the parallels to scapegoating there were in other ancient near eastern cultures.
Follow up question: Are all cloven-hoofed animals also associated to some extent with the the occult, or just goats?