God wanted the Jews to not be influenced by the sins of those who occupied the land. At the end of the Book of Genesis, you read how Joseph went from slave, to prisoner, to second in command in Egypt. There are several examples where the leaders were influenced by Hebrew slaves...Nebuchadnezzar is a great example.
It is reasonable that a slave could influence his/her owner to follow their religion. it would be possible for slaves of the people of Canaan could influence the Hebrews to follow after false gods. The history of the books of Samuel, Kings, and Chronicles show a Jewish history of turning against God, to follow false gods, God's judgment, God showing grace by sending a deliver who turns the people back to Jehovah.