Joseph is a Solomon at the end of Genesis, a picture of a glorified Adam-King, providing bread for the world. And like Solomon, Joseph married an Egyptian woman. And in so far as these daughters of Egypt were actually converted to Yahweh, and these marriages represent evangelism and the gospel going to the Gentiles, they are glorious previews and glimpses of the New Covenant.
But in so far as these marriages lead to other unfaithful intermarriages with pagan wives, they are the beginning of idolatry and syncretism in Israel. While perhaps Joseph did not personally enter into marriages with unconverted Egyptian women, it is not hard to imagine other Israelite men following his “example” foolishly. Joseph married the daughter of an Egyptian priest, why can’t I?
And by the time of Moses, Israel is serving the gods of Egypt (Ez. 20:7-8).
Notice the parallels in the Solomon/Joseph narratives:
Joseph –> idolatry in Egypt –> Exodus –> worshiping a calf in the wilderness
Solomon –> idolatry in Israel –>Divided Kingdom –> worshiping calves in the northern kingdom