I frequently receive questions about the census mentioned in the Gospel of Luke. Specifically, people ask about the problematic nature of this census with regard to its historicity and to the fact that it doesn't align so well with the birth narrative offered in Matthew's Gospel. First, know that biblical scholars have wrestled with this census issue for over a century. But let me explain it as best I can here.
Luke 2:1–3 reads:
(1) In those days a decree went out from Emperor Augustus that all the world should be registered. (2) This was the first registration and was taken while Quirinius was governor of Syria. (3) All went to their own towns to be registered.
There are a couple of problems with the census.
First, Quirinius and Herod the Great did not rule at the same time. Herod the Great died in 4 BCE. (If that fact alone causes you some hesitation—the fact that Jesus must have been born 4 to 7 years "before Christ" (BC)— please read my 2009 article, Why Christians Should Adopt the BCE/CE Dating System, which explains why this is the case.) Anyway, Herod the Great died in 4 BCE, and yet Publius Sulpicius Quirinius wasn’t appointed as the governor of Syria until 6 CE, that is, well after Herod the Great died and after Herod’s son and successor, Archelaus, was banished as ruler of Judea.
What does this mean? It means that Quirinius didn’t rule until 10 years after Herod the Great had died! This means there is no way that Quirinius could have called a census while Herod the Great was king. Herod had been dead for a decade! And this means that Jesus couldn’t have been born both during the reign of Herod the Great and during the census of Quirinius! It's not possible—the chronology is off by a decade.
At the very least, there's a historical mistake recorded in the Bible. Either Luke wrote down the name of the wrong governor, or there was no census. Luke used the census as a literary device to bring Mary and Joseph to Bethlehem of Judea so that Jesus of Nazareth, would be born in Bethlehem. But we'll come back to that problem in a second.
There is a second problem with the census in Luke 2. Simply put, Romans did not require subjects to return to their ancestral homes to be counted, rather, they made them return to their present homes. To explain this, I’ll refer you to what I wrote on pg. 230 of my 2016 book, The Cities That Built the Bible:
First, censuses were taken for the purpose of taxation. Although there are certainly literary records of censuses taking place throughout the Roman Empire at this time, there is no evidence that those who were being counted were required to travel to their ancestral hometowns in order to be counted. Indeed, an Egyptian census edict of Gaius Vibius Maximus, the Roman prefect of Egypt from 103 to 107, did require that “all persons who for any reason whatsoever are absent from their home districts be alerted to return to their own hearths, so that they may complete the customary formalities of registration and apply themselves to the farming for which they are responsible.”
Although this edict of Gaius Vibius Maximus does mention a return home for the purposes of taxation, residents were not required to return to their ancestral homes, but to their present homes, so that both people and assets could be assessed for purposes of taxation. Essentially you couldn’t be “out of town” when the government came to take the census and collect taxes. Indeed, traveling to one’s ancestral home would not allow pilgrims to “apply themselves to the farming for which they are responsible.” Rather, residents under Roman rule were to go to their present homes so that they and their possessions could be counted and taxed. Luke further strains credulity by arguing that the nine-months-pregnant Mary would have made the arduous three-day journey from Nazareth to Bethlehem. Thus, any registration would have required Joseph and his family to return to their present homes to be counted, and Jesus’s present home was in Nazareth, not Bethlehem.
 Josephus, Antiquities 17.13.5 (17:354); 18.1.1 (18:1–2).
 Lewis, Naphtali, Life in Egypt Under Roman Rule (Oxford: Clarendon Press, 1983), 156. The census edict of Gaius Vibius Maximus of 104 CE from Alexandria is written on papyrus and cataloged as P.London 904 in the British Museum. See also Hunt, A. S., and C. C. Edgar, Select Papyri, Volume II: Public Documents. Loeb Classical Library 282. Cambridge, MA: Harvard Univ. Press, 1934.
Essentially, we don’t have evidence that subjects of ancient Rome were required to return to their ancestral homes for counting and taxation purposes. Returning to an ancestral home actually defeated the purpose—all a subject’s property would still be back in their present home. The Romans wanted to see who was in each present household and what they owned so they could tax it.
Thus, it is far more likely that Luke used this chronologically-challenged census as a literary device to bring Joseph and Mary to Bethlehem temporarily so that Jesus could be born there, as Luke depicts Joseph and Mary as living in Nazareth both before and after his birth.
Remember, this is different from the birth narrative in the Gospel of Matthew, which depicts Joseph and Mary as already living in Bethlehem, and Jesus simply being born at home. There is no mention of an "inn" or manger or guest house in Matthew's Gospel like there is in Luke 2:7. Note also that there is no mention of Nazareth (or a census for that matter) prior to Jesus’s birth in Matthew’s Gospel. In Matthew’s Gospel, the star appears, and the magi begin their trek from the east to Bethlehem (Matthew 2:1–2). They stop to speak to Herod the Great on the way. This all takes some considerable time and is not congruent with a short, temporary stay in a Bethlehem guesthouse. Joseph and Mary lived in Bethlehem according to Matthew's Gospel, and following Jesus's birth, they fled to Egypt for a couple of years (Matthew 2:13–15). Only after Herod the Great died did they move to Nazareth and make their new home there because they learned that Herod's son, Archelaus, was ruling in Jerusalem (Matthew 2:19–23). It is clear in Matthew's Gospel that Mary and Joseph did not previously live in Nazareth, as verse 23 says, "He made his home in a town called Nazareth." There is no need for Matthew to introduce the reader to the town of Nazareth if Mary and Joseph had already lived there prior to Jesus's birth.
Thus, there are multiple problems with the census in Luke chapter two. First, Quirinius and Herod the Great didn’t rule at the same time so Jesus couldn’t have been born during both of their rules. Second, Romans didn’t require their subjects to return to their ancestral homes to be counted, but instead to their present homes. This creates a problem because in Matthew's Gospel, Mary and Joseph live in Bethlehem, and only move to Nazareth after fleeing to Egypt, while Luke's Gospel depicts Mary and Joseph as already living in Nazareth. Thus, Luke likely used the census as a literary device to bring Jesus to Bethlehem, so that he could be born according to the prevalent tradition that Jesus of Nazareth was born in Bethlehem.