to enroll himself with Mary, who was pledged to be married to him as wife, being pregnant.
Being great with child ... suggests that, since the time of delivery was near, the most urgent considerations had induced Mary to accompany Joseph on this trip.