The Mishna (72b) teaches about children who live in separate dwellings in a courtyard – a hatzer – together with their father. Although they sleep in their own apartments, they eat with their father. If no one else lives in the hatzer, they are considered one family unit and can carry there without an eiruv. If there are other families in the hatzer, there is a need for an eiruv.
The Gemara on our daf discusses other cases where members of the same family share residence in a single courtyard.
The Sages taught in a baraita: With regard to one who has five wives who receive a portion from their husband while each living in her own quarters in the courtyard, and five slaves who receive a portion from their master while living in their own lodgings in the courtyard, Rabbi Yehuda ben Beteira permits in the case of the wives, i.e., they do not each have to contribute separately to the eiruv, as they are all considered to be residing with their husband. And he prohibits in the case of the slaves, meaning that he holds that as they live in separate houses, each is considered as residing on his own.
Rabbi Yehuda ben Bava permits in the case of the slaves, as a slave necessarily follows his master, and he prohibits in the case of the wives, as each woman is significant in her own right, and is not totally dependent on her husband.
The Ra’avad explains that the first position, that allows the wives to be considered part of their husband’s eiruv, is because with regard to many halakhot (Yibum, for example) the wives are considered to be connected, so that whatever applies to one of them applies to all of them. The second opinion, that servants are more connected than the man’s wives, he explains by pointing out that they are considered by the halakha as his property, and therefore fall under his rule, as opposed to his wives who retain their independent status, even as they are supported by him.
Most of the rishonim rule like Rabbi Yehuda ben Bava, because the Gemara quotes Rav as bringing a passage from Sefer Daniel (2:49) in explanation of his position, indicating that Rav accepts it. Maimonides, who rules that both wives and servants can rely on the eiruv made by their husband or owner, appears to accept the reasoning behind each argument.