Apparently, the innkeeper gave them the use of the stable, free of charge. Logically followed from that premise, the innkeeper would become a charity, himself begging for money to supply others with room and board from the goodness of his heart, and that of the donors. In the Literal Word, the Holy Family was just passing through. After the visit from the shepherds, a few days later, the Wise Men found Mary in a house. Eventually, everyone fled Herod's soldiers. But the next needy person might not be a traveler. Then, the innkeeper could have a permanent guest. In the final analysis, his inn would be filled, not with the families of itinerate carpenters, but with clans of the unemployable.
On the other hand, our commercial culture rests on several thousand years of norms, folkways, and customs that prevent and remediate such conflicts. The power of the purse and the sanctity of contract could have informed a better solution.