It is traditional at this time of year for commentators to misrepseresent the Christmas story, urging more social housing to deal with the problem of homelessness.
If they read the bible story more carefully, they would see it was not a housing shortage but a hotel bedroom shortage that caused the trouble. This shortage had been brought on by a nasty government, forcing people to travel away from their homes to the large towns and cities to register and to pay a tax. It was some kind of combination of an an early forerunner of ID cards with a poll tax.
As far as we know Joseph had a home,and turned to a home in Nazareth after the stay in Egypt, where they successfully evaded the massacre of the innocents ordered by Herod.
The New testament story is interwoven with interesting questions of how Jesus should relate to the kings on earth. His advice of render unto Caesar what is Caesar’s was wise indeed. It recognised the brutal reality of Roman power, whilst reassuring people there were other values that the temporal power could not overcome in the free minds of men.