He was exsposed to the God of Israel through the Jewish people. This is not contrary to the Biblical depravity of men.