The midrash teaches that Yaakov understood the immorality and spiritually impure atmosphere of exile, so he had all who came with him to Egypt marry before leaving - even the young grandchildren who were still babies.
Marriage is a protective shield against immorality.
A strong Jewish home is the only refuge from the outside influences of golus and Yaakov wanted all of his descendants protected. They transplanted to golus the life devoted to study that they had back home. The Sefas Emmess says that the fact that they came as Jewish households is what set them up for salvation from Egypt.