Luke explains that Caesar Augustus issued a decree for a registration, and Joseph went from Nazareth to Judea, to the city of David called Bethlehem, because he was of David’s house and lineage. Mary was with him, and while there she gave birth to her firstborn son (Luke 2:1–7).
Luke Luke 2:1–7 explains how a Roman enrollment order sets Joseph and Mary on the road from Nazareth to Bethlehem. Luke anchors the story in named officials and the movement of “all” people to register in their “own city.” Joseph goes because of his family line connected with David, and Mary goes with him while pregnant. This scene follows Luke’s earlier announcements and pregnancies in chapter 1, where events are introduced as taking place in identifiable times and places (e.g., rulers, towns, and family relations).
Luke presents Jesus’ birth as happening inside ordinary public history, not in a detached myth-world. An imperial order from Caesar Augustus sets the timetable in motion, and Luke adds named time-markers (Augustus and Quirinius) to locate the event. Explicitly, the decree requires registration, and that requirement produces travel.
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with Luke 2:1-7, then read the surrounding section so the answer stays connected to the passage's flow.
1Now it happened in those days, that a decree went out from Caesar Augustus that all the world should be enrolled.
2This was the first enrollment made when Quirinius was governor of Syria.
3All went to enroll themselves, everyone to his own city.
4Joseph also went up from Galilee, out of the city of Nazareth, into Judea, to the city of David, which is called Bethlehem, because he was of the house and family of David;
5to enroll himself with Mary, who was pledged to be married to him as wife, being great with child.
6It happened, while they were there, that the day had come that she should give birth.
7She brought forth her firstborn son, and she wrapped him in bands of cloth, and laid him in a feeding trough, because there was no room for them in the inn.