The familiar story about a baby in a manger is probably misunderstood entirely by most readers, especially in Western culture. The main point that it attempts to make is often taken for exactly the opposite.
The key question to understanding the whole story comes down to the question: "What exactly is a Jewish carpenter, and what does he do?" In Europe and most of the Western world, a carpenter is a semi-skilled "blue collar worker" who constructs houses and other buildings. In much of the Middle East, particularly in places where the only trees in any quantity are diminutive olive trees and date palms, wood is not used in most construction. Lumber for that purpose is generally imported from places like Lebanon, and the cost of transporting it makes it rare and valuable. A "carpenter" is really only needed for major construction of Palaces, Temples, and large mansions with a sizable open space, which makes wooden beams a necessity, despite the cost. In this case, it's generally not done by a typical "blue collar worker" (like a wood carver or furniture maker), but by someone with the wealth, connections, and reputation to carry out transactions with a foreign supplier of lumber, arrange for payment or credit, and oversee both the transport and construction work, including the architectural design considerations for load-bearing and deflection of roof beams over large spans. In short, a "Jewish carpenter" is more likely to be a highly paid and highly skilled professional or construction contractor for major government or religious projects.
In an era where 95% of the population had probably never been more than 10-20 miles from home, the family of Joseph and Mary were mobile. They had travelled, and had contacts in Egypt, and probably Lebanon as well.
The family was not merely "nobility", but royalty, being direct descendents of King David. In an era where the king effectively WAS the government, being a relative was a mark of prestige and distinction, and often political power. We are probably taking about one of the most elite and respected families in the kingdom other than the king's immediate household, not an obscure "working class" couple.
In that culture and time period, the "head of household" was typically responsible for his entire extended family, and often provided housing for a large number of relatives. In the case of Joseph and Mary, the entire extended family may have travelled with them to whatever worksites they went to, possibly serving as at least part of the construction crew. The travelling entourage may also have included non-family workers, and could have numbered anywhere from a handful to 50 or more people. When the family showed up in in the small town of Bethlehem, is there any surprise that there was no room for such a travelling group? The story does not explicitly say the the rooms were booked, or that they weren't; the writers of the day did not feel that it was necessary to explain why they were unable to find accommodations. Either it was considered unimportant, or else the conclusion would have been obvious to the reader of the time, and needed no elaboration. It's a reasonably possiblilty that they simply would not have fit, regardless of current occupancy. In any event, they were permitted to set up camp on the premisis, and use some of the facilities.
Not too long after the birth of Jesus, emmisaries from Persia arrived, possibly trying to get into the good graces of a family who stood some chance of raising a future king. Again, international contacts and connections were made. When King Herod took the threat of a potential rival claimant seriously, the family fled to Egypt, which apparently found it valuable to have a legitimate replacement for the current ruler in their pocket, in case events required or favored intervention or invasion. Can there be any mistaking the level of threat that the king felt in order to command that all children under 2 years of age to be killed? What modern ruler could even consider such a drastic measure? What potential for a popular revolt and overthrow did that create, and how dire was the situation for the king to consider that to be an acceptable price to pay?
The story goes out of its way to point out how Jesus was qualified through background, wealth, prestige, international connections, and popular support, to become a ruling king on earth. Instead, we mistake it as depicting him as coming from a "typical working class" background, just "one of the guys". This is just one of many cases where a lack of understanding of the culture and time period leads to entirely false concepts and imaginings, in all aspects of historical study.