Bart D. Ehrman, The New Testament: A Historical Introduction to the Early Christian Writings, sixth edition (OUP, 2016), 155-156.
One of the telling differences between the two accounts has to do with the question of Mary and Joseph’s hometown. Most people simply assume that the couple lived in Nazareth. In the familiar story of Luke’s Gospel, Mary and Joseph leave town for a trip to register for the census in Bethlehem during the rule of Augustus as emperor and Quirinius as governor of Syria…Mary happens to give birth there (2:1-7), and the couple then returns home just over a month later (2:39; following the law spelled out in Leviticus 12).
Before examining this account in greater detail, we should recall what Matthew says about the same event. Matthew gives no indication at all that Joseph and Mary made a trip from Galilee in order to register for a census. On the contrary, Matthew intimates that Joseph and Mary originally came from Bethlehem. This is suggested, first of all, by the story of the wise men (found only in Matthew), who arrive to worship Jesus after making a long journey in which they follow the star that evidently appeared some two years earlier in the heavens to indicate his birth (Matt 2:2, 16). They find Jesus in Bethlehem in a “house” (not a stable or a cave; Matt 2:11). Unless one had reason to think otherwise – and Matthew gives readers no reason for doing so – one would assume that the house is where Jesus and his family normally live.