QUESTION: The Gemara [Bava Basra 21] quotes a Beraisa which states that a homeowner in a jointly-owned courtyard may not rent his house to a Mohel, a blood-letter, a wool-comber, or a non-Jewish elementary school teacher, if the other homeowners object. A person with one of these occupations who takes up residence in the courtyard causes a significant increase in the noise level in the courtyard because of the large number of people who come to seek his services.
Why does the Gemara prohibit only renting out one's house for those purposes? The Gemara should also prohibit selling a house to such people. (RASHASH)
(a) The RASHASH answers that it is obvious that selling a house to someone who will create a significant disturbance in the courtyard is prohibited. The Gemara wants to teach that even renting a house for such a purpose is prohibited, even though a rental might be for a short time. The Gemara teaches that even a temporary disturbance is also prohibited.
(b) The Rashash answers further that the MORDECHAI rules that one is permitted to sell a house for these purposes. The reason is that the neighbors always have the option to protest when the new owner begins to make noise in the courtyard, and they will be able to take him to Beis Din and force him to stop causing a disturbance. Since the neighbors have this recourse, one is not prohibited from selling the house in the first place. (According to this answer, if the buyer is not Jewish and will not agree to go to Beis Din, then the owner indeed may not be allowed to sell the house to him.)
Why does the same logic not apply to a rental? The owner should be permitted to rent out his house to anyone, and if the renter creates a disturbance, the neighbors will be able to take him to Beis Din.
The S'MA (CM 156:8) answers that when a person buys property, he does not always intend to use it immediately for his profession. A person may purchase property but not live in it until he retires from his profession, at which point he moves into the property. (He may allow a family member to live there in the interim.) Since it is not known whether the purchaser will use the house in a way that causes a disturbance, the sale is not a case of "Bari Hezeika" and the owner therefore cannot be prevented from selling it. If the buyer later decides to use the house for a noisy purpose, the neighbors can summon him to Beis Din at that point. In contrast, a person who rents property usually moves into the rented property immediately; a person is not likely to rent property and refrain from living in it. Therefore, renting a house to a person who practices a noisy occupation is "Bari Hezeika," and the owner is not allowed to rent out his house to such a person.
[From daf yomi.co.il]