It says there was no room at the inn. If they went to Joseph’s hometown to be counted in the census, then he’d be there with his extended family, Unless there were none left (orphaned?) Or none would accept him into their house (pregnant betrothed? adulterer?)
In ancient times the status of a people or a city was built on their hospitality. It was shameful and dangerous for a visitor to not have a place to stay.
“There they stopped to spend the night. They went and sat in the city square, but no one took them into his home for the night… No one has taken me into his house. We have both straw and fodder for our donkeys and bread and wine for ourselves your servants‚me, your maidservant, and the young man with us. We don’t need anything.” “You are welcome at my house,” the old man said. “Only don’t spend the night in the square.” (Judges 19:15-20 NIV)
The origins of the Messiah are tricky.
He has to be a Nazarene, but He needs to be born in Bethlehem, the city of David. He has to be lower class, so that none can say He had it easy, but he has to be brought up out of Egypt, which would be an expensive trip to get to in the first place.
He has to be a priest (line of Levi via Aaron) and a king (line of David) and a prophet.
The fact is, no city or nation, no house nor inn, no social class or ancestry can contain Him. He is the King of Kings, and the Lord of all Lords.