Bethlehem is hardly mentioned in rabbinic literature. In the time of Jesus it was probably a small village of a few hundred residents, and consequently had only one inn.
The typical inn in such a small settlement had one room with no allowance made for separate quarters for men and women. However the boarders did not have to undress in mixed company, because they slept in their clothes. The men, for instance, removed their talit, or outer heavy woolen garment, and slept in their haluk, their lightweight, inner robe (see “The Hem of His Garment,” Jerusalem Perspective 1.7 [April 1988]: 2). Families slept together on simple mats thrown on the dirt floor. The innkeeper provided little more than space, but at least it was shelter and protection from marauders.
The rabbinic ruling was that a man could not sleep in the same room with two women, unless one was his wife (Mishnah, Kiddushin 4:12). It was assumed that this would prevent promiscuity. However, it was considered acceptable that when a man was on a journey he could sleep in an inn in the same room with other women even when unaccompanied by a wife. The inn was viewed as a public place because of its open arrangement.
Luke 2:7 states that there was no room for Mary and Joseph in the inn, but this may only have been the excuse the innkeeper gave. Probably the real reason the Bethlehem innkeeper refused to accept the couple was because Mary was obviously pregnant. The innkeeper could not be sure how long Mary and Joseph would stay, and if Mary had given birth while at the inn the other guests would have been inconvenienced by having to leave the room. Having no alternative, Mary was forced to give birth in a stable.