...the text literally explains that everyone was supposed to go to the regions allocated for their tribe? The whole Old Testament shows that Israel is pretty big on "this area belongs to this tribe, that area belongs to that tribe" for a while. The concept of the Year of Jubilee (when any land sales that were made revert back to their original owners) puts a really fine point on this.
But to give the exact quote from Luke 2:1-4:
Now in those days a decree went out from Caesar Augustus, that a census be taken of all the inhabited earth. This was the first census taken while Quirinius was governor of Syria. And everyone was on his way to register for the census, each to his own city. Joseph also went up from Galilee, from the city of Nazareth, to Judea, to the city of David which is called Bethlehem, because he was of the house and family of David,