Luke 2:1-7 (ESV)
In those days a decree went out from Caesar Augustus that all the world should be registered.  This was the first registration when Quirinius was governor of Syria.  And all went to be registered, each to his own town.  And Joseph also went up from Galilee, from the town of Nazareth, to Judea, to the city of David, which is called Bethlehem, because he was of the house and lineage of David,  to be registered with Mary, his betrothed, who was with child.  And while they were there, the time came for her to give birth.  And she gave birth to her firstborn son and wrapped him in swaddling cloths and laid him in a manger, because there was no place for them in the inn.
This is one area where the Bible has proven itself to be correct where it was once thought to be wrong. It is quite amazing, but in past times people have thought they knew more about the history of things than the people who experienced it. This was the hubris of the 19th and 20th century which we still live with today. Many try to discount the Bible with the same shortsighted arguments that were first given expression at that time. Liberal theologians thought that they knew enough of ancient history to posit that this census never occurred. It has since been shown that it has.
Of course one would think that if it had never occurred, the book would never have found such a wide acceptance among the people it was first delivered too. People tend to be well aware of the history of which they have been a part. This is one reason I never buy into hypothesis concerning the origin of the Pentateuch or Isaiah. It just seems to far fetched to think that literate people would take a book like that which they would know to be false. The editing of it would be apparent to them at the time, and they would throw it out right away.
The census did occur, and for this reason Joseph and Mary went to Bethlehem. There Jesus was born as it was prophesied of him.
I always think it strange that there was no room for them. I think the emphasis has to be on the “for them.” I don’t think this was a matter of there just being no room. This was a town in which Joseph had relatives, why should he even have to knock on an inn door? I think this had everything to do with self-righteousness not finding room for those they deem unworthy, a teenage girl pregnant out of wedlock, about to give birth to a bastard child, and the dupe that would be her husband. I think too often we are prone to thoughts of the same today. But when we don’t have room for these people in our lives, we don’t have room for Jesus either. Thankfully, Jesus has room for us.