Mary is the more prominent figure in the Christmas story, yet Joseph is the one to whom God gave his instructions. Joseph was the head of his family, and he was charged with protecting Jesus from Herod's wrath. Mary trusted his decision. This was no vacation in the southland, mind you. This was a trip of about two hundred miles by foot or donkey, over mountains, wilderness, and desert, with a baby under two years of age.
Most mothers can appreciate the degree of inconvenience that involved.
I doubt whether Mary really wanted to go. But there is no indication in Scripture that Mary ever questioned Joseph's decision. And it happened again. As we saw in the lives of Abraham and Sarah, submission for a wife means trusting God to work through her husband to do what is best for her. And that includes trusting his decisions.