
One of the early sages, Rabbi Shimon son of Yochai, ruled that one of the things which the Lord hates is people having sexual relations when there is other life in the room. One of the scholars asked: Did the early sage, in saying “in front of any living thing” also mean that the Lord hates people having sex in a room where mice are present? Answer: No. He meant slaves and maidservants in the room, as was customarily in some homes, where the master would have sex though slaves and maidservants were in the room, because the slaves and maidservants were considered like animals and donkeys. This consideration is based on the verse “And Abraham said to his young men, ‘Stay here with the donkey'” (Genesis 22:5) — his young men were his son Ishmael, considered a gentile, and Abraham’s servant Eliezer. Abraham told them “Stay here with [im] the donkey.” The word im was changed to am, as though Abraham told the men “a nation comparable to a donkey.” Since gentiles and servants are considered as donkeys, they allowed themselves to have sexual relations in front of them. Other sages customarily drove out any living being from their rooms before having sex. Thus did the scholar Rabbah son of Rav Huna practice; he would ring a bell in his room so his household members would get the hint and leave the room. (Others say the bell was meant to chase flies out of the room.) Another scholar, Abaye, would chase flies out of his room before sex, and yet another scholar, Rava, would chase out the mosquitoes before sex.
(Babylonian Talmud, Tractate Niddah 16b-17a)