Verse 1
Luke 2:1
Census -- Roman Census required men to register in the town where they had a house or fields. Apparently, Joseph’s home town was Bethlehem, not Nazareth. Luke 2:4
When Joseph and Mary return from Egypt, the intended to return to Joseph’s home town (Matthew 2:22) but ended up going to Galilee where it was safer, back to Mary’s home town makeing it their own town (Luke 2:39) until Jesus later make Capurnaum his home.
His intention seems at the same time to have been, henceforth to dwell in Bethlehem; since after the flight into Egypt he returned thither, and was only led by a divine admonition to turn aside to Nazareth. (Caspari, p. 62).
That registers of descent were kept, is vouched for by Ezra 2:1-57, and especially Ezra 2:59-63; and that they were preserved in the case of those performing the functions of the priesthood, and particularly in that of descendants of the house of David, is confirmed by the books of Jewish tradition. Thus we read in Jerus. Taanith, fol. 68. 1, that a genealogical table existed in Jerusalem, which showed that Hillel was descended from David through Abital; (Caspari, p. 63)