MAY PEOPLE PREVENT BUSINESS COMPETITION FROM ANOTHER CITY?
Gemara
21b (Rav Huna): If a member of a Mavoy set up a mill (to grind for wages, or to rent it out), he can stop someone else in the Mavoy from setting one up, for this infringes on his livelihood.
Question (Beraisa): One may set up a store or bathhouse next to another's. The first cannot protest, for each is on his own property.
Answer: Tana'im argue about this;
(Beraisa): People of a Mavoy may force one another not to allow a tailor, tanner, teacher of children or a craftsman to set up shop among them. One cannot prevent his neighbor.
R. Shimon ben Gamliel says, he can prevent him.
(Rav Huna brei d'Rav Yehoshua): Surely, one can prevent someone from another city. If they both pay head-tax in the same city, he cannot prevent him. One cannot prevent someone from the same Mavoy.
Question (Rav Huna brei d'Rav Yehoshua): Can one prevent someone from a different Mavoy?
This question is not resolved.
22a: People selling baskets (some say - pots) came to Bavel. People of the city came to stop them.
Ravina: They came from elsewhere. They may sell in the market to visitors who come on the market day. They may not go around the city.
Rishonim
Rif and Rosh (2:12): The Halachah does not follow Rav Huna, for he holds like an individual (R. Shimon ben Gamliel). Also, Rav Huna brei d'Rav Yehoshua is Basra, and he argues with Rav Huna. Since the question was not settled, they cannot stop him.
Rambam (Hilchos Shechenim 6:8): If a stranger from elsewhere came to set up a store or bathhouse opposite an existing one, they can stop him. If he pays taxes to the king with them, he cannot stop him.
Rosh (Teshuvah, cited in Tur CM Sof 156): If a Yisrael wants to move to a village and earn money there, and the villagers protest, lest he cut off their livelihood, they cannot stop him. The Gemara said only that people of the city can stop an outsider, but surely one may live whenever he wants, and people of the city cannot stop him. Did the first residents acquire a Chazakah?!
Hagahos Ashri (2:12): Mahari'ach was unsure whether residents can stop him from becoming part of the city. Or Zaru'a rules like Rashi, who says that they can; he says that R. Tam disagrees.
Rebuttal (Darkei Moshe 156:8): Rashi and R. Tam discuss when he wants to live outside, pay taxes and be like a resident. The Rosh discusses one who wants to move to the city. He could hold like Rashi!
Mordechai (513): The Ri says that when basket sellers came to Bavel, the resident sellers were able to stop them only if they sold as cheaply as the visitors. If the residents want to sell for more than the visitors, the people of the city can say 'we want to buy from the visitors. Unless you will sell as cheaply as them, they will sell against your will.' I disagree, for they have no claim (Rema - their claim is only) against the visitors; R. Yehudah and Chachamim argue about whether or not a grocer may sell for less than the going price.
Note: It seems that the Rema explains that the Mordechai disagrees because the local vendors' claim is only against the visitors. The other residents are not parties in this case. Without the Rema's Hagahah, the Mordechai says that they (the other residents) have no claim, and are not parties in the case.
Poskim
Shulchan Aruch (CM 156:5): If a stranger from elsewhere came to set up a store or bathhouse opposite an existing one, they can stop him. If he pays taxes to the king with them, he cannot stop him.
Beis Yosef (DH b'Hezek): Rashi explains that Rav Huna brei d'Rav Yehoshua allows one to prevent someone from another city from offering the same service as he does, because he infringes on his income. He was unsure whether one can stop someone offering the same service in another Mavoy (alleyway). Also Tosfos says that the entire city can stop someone from another city, unless he pays taxes with them. Then, only a similar professional can stop him from entering his Mavoy. The Magid Mishneh says so in the name of Mefarshim; the Tur holds like this. It seems that the Rambam holds that if he pays taxes with them, a similar professional cannot stop him from entering his Mavoy.
Beis Yosef (DH Nimtza): The Halachah is, if the latter is not from this same city and does not pay head-tax to this mayor, people of the city can stop him from setting up anywhere in the city. If the latter is not from this same city but pays head-tax to this mayor, he can compete with the first, but not in the same Mavoy. If he does not pay property tax, but wants to pay head-tax, some say that one can stop him from competing in his Mavoy until the latter rents a house and becomes a resident of this city. If the Mavoy is not Mefulash (it opens to Reshus ha'Rabim only on one side), and he wants to enter on the side such that a Nochri cannot get to Reuven's house without passing by this one's door, he cannot stop him.
SMA (16): If one from another city pays taxes here, it is as if he lives with them, so they cannot stop him. The opposing opinion holds that the Beraisa discusses a Stam Mavoy, which is Mefulash. There is no claim of increasing traffic there, only a claim of competition. Why can only someone from that Mavoy protest, but the entire city cannot protest? We must say that he pays tax here.
Shach (3): What was Rav Huna's question? Surely the outsider is no worse than one from another city who pays taxes here. Surely they cannot stop him when there is another professional here! This is not difficult for those who explain that the Rambam discusses protest due to competition.
Gra (17): Here, the concern is only competition.
Rema: Many say that in any case he may not enter a Mavoy with professionals, for the professionals can stop him, since he is from another city. People from another Mavoy (that he wants to enter) cannot stop him, since he pays taxes (with them). People of the city can protest in any case, and they can say 'we cannot sleep due to the noise of people entering', even if there is already such a professional in the Mavoy.
Gra (20): 'People of the city' means people of the Chatzer (SMA 17 - or Mavoy she'Eino Mefulash); they can protest due to traffic.
Gra (21): According to Tosfos and the Rema, there are four levels. People of the Chatzer can always protest. People of a Mavoy she'Eino Mefulash can protest against people of another Mavoy, due to increased traffic. People of a Mavoy Mefulash cannot protest even against people of another Mavoy, but they can protest against people of another city, even if they pay land tax here. People of another Mavoy (not where the professional wants to set up shop) can protest only against people of another city who do not pay land tax here.
Rema: If one did not pay tax until now, and now he wants to engage in his trade and pay taxes, some say that those of his trade can stop him, until they rent a house to him and he is like a city resident.
SMA (18): The Rema discusses when people of the city do not protest. If not, the Rema would contradict what he says in Se'if 7.
Rema (7): If one wants to move to a city, pay taxes and be like one of the residents (and have rights to earn money there), some say that he may, for one may live anywhere. The first residents did not acquire a Chazakah. Some disagree and say that the first residents can stop him, especially nowadays that we live among Nochrim, and there is concern that if more residents come, there will be problems from the Nochrim. One who comes to live here is like a Rodef (one who seeks to kill another).
SMA (25): The Cherem is not on the immigrants (only on the residents).
Gra (47): Rodef applies even without intent to harm (Bava Kama 117b)
Rema: All agree that the residents can close the door and cause the leaders to protest against immigrants, or other ways to stop them. In some places they make a Cherem Chezkas Yishuv (not to let outsiders into one's house). Then they force through Cherem, not through letter of the law. They can decree not to do business with people who immigrate without permission.
Gra (48): Even R. Tam says only that they cannot stop him through Beis Din, for the city is like Hefker, and whoever is first gets it, but they can stop one from taking it. Even if one spread his Talis over a Mitzvah, (since he did not acquire) we take it from him (Pe'ah 4:3).