In our neighborhood, there are regular bread distributions from an organization called Shelach Lachmecho. They bring bread each week to religious neighborhoods and allow avreichim to take five loaves of bread. Sometimes I ask one of my neighbors who is going anyway to take bread for me as well. There isn’t enough bread for everyone and it is distributed on a first come-first served basis. I was thinking that perhaps this arrangement is not permitted because we learned in the Gemoro (Gittin 11A, BM 10A) that if a person owes money to several people a non-creditor can’t take money on behalf of one of the lenders because he is thereby hurting the other lenders. Perhaps, here too since my neighbor is hurting others by taking bread for me, he shouldn’t do so?
The first point we should clarify is that the Gemoro does not discuss whether it is permitted or not but rather whether it is effective or not. Specifically, the question that is discussed by the Gemoro is whether a creditor can force a non-creditor who collected money from a borrower on behalf of a different creditor, to surrender the money to him. The Gemoro rules that he can. The Gemoro (Kesubos 84B) tells how two Amoraim who were creditors forced a non-creditor who took a boat from their borrower on behalf of a different creditor, to surrender the boat to them. The Gemoro says that the reason is because the first creditor did not acquire ownership of the money even though the money was taken from the borrower on his behalf.
The reason (in the case of the Amoraim) the creditor did not become the owner of the boat is that his gain was another creditor’s loss. The principle applies to all cases and is the following: A person can become the owner of a something that was taken properly (A formal act of kinyan-acquistion was performed) on his behalf only because of zechiya. The Gemara says that zechiya is effective only if no one else loses. If someone else loses, zechiya is not effective. This means that the creditor on whose behalf the object was taken does not become its owner before he himself performs a formal act of kinyan. However, the Gemoro does not say that the person who took the object on his behalf violated any prohibition, as you seem to have understood.
Therefore, we do not have a source to prohibit your neighbor from taking bread on your behalf from the Gemoro you cited.
However, there is an issue is based on the reason the intended owner does not immediately become its owner. As we mentioned, Rashi (BM 10A) and many others explain that the reason is that the entire halachic basis that one can become the owner of an object that was taken on his behalf, is the concept of zechiya, that one who does something to benefit another is acting as that other person’s agent. This concept is effective only if no third party is harmed by the agent’s actions. According to this approach there is no indication that one who took the object acted improperly even though another person was harmed by him. His action is just not immediately effective. The one on whose behalf he took the money only becomes the owner if and when he actually receives the money.
However, the Pnei Yehoshua (Kesubos 84B) and the Beis Meir (res 35) (cited by R. Akiva Eiger in his notes to CM 105) write that the reason the agent’s actions are not effective is because acting on one person’s behalf in a manner that is detrimental to another is a devar aveiro-an improper action, and there is no proxy representation (shlichus) to do an action that is a devar aveiro. The rule is ein shliach ledvar aveiro. According to this approach, it is improper to act in a manner that benefits one person and harms another.
Thus, it seems that according to the P’nei Yehoshua and Beis Meir the arrangement you make with your neighbor is improper.
However, before deciding this issue it is important to examine the situations where the Gemoro applies the rule that a person is not able to act to benefit one person if another is harmed.
One case where this rule is applied is pe’ah. In general, a field owner may not harvest the entire produce of a field for himself. Rather, he must leave a portion of the produce at the edge of the field, known as pe’ah, for poor people to harvest. The owner of the field has no control over this produce and he may not even distribute this produce among the poor people.
Another case is a lost object which the owner gave up hope that it would be returned (yi’ush). In this case as well, since the object is lost and its owner despaired of recovering it, the former owner has no legal rights over the object that is being taken because the object is basically ownerless.
In both of these cases the issue is whether a person who has no personal right to the object has the power to take an effectively ownerless object on behalf of one of the people who are entitled to take possession of it.
However, the bread that is distributed is not ownerless. Rather the bread belongs to the organization known as Shelach Lachmecho and they can make rules to govern the distribution of their bread. Therefore, if the organization permits a person to take bread on behalf of his neighbor the person taking the bread is certainly not acting improperly. In fact, as soon as he takes the bread on behalf of his neighbor the neighbor becomes the owner of the bread.
While the reason we gave is sufficient we should note that an additional reason to permit your arrangement is because it is difficult to base a prohibition on the reason of the P’nei Yehoshua. The reason is because many Rishonim give the other reason we cited and make no mention that there is anything improper in taking for one person even at the expense of others. Moreover, the Ketsos (105, 1) and others object to the P’nei Yehoshua’s reasoning and argue that the rule that an agent’s action on behalf of another is ineffective if an aveiro is involved, applies only if the one on whose behalf the action is being done is committing an aveiro and not if the agent is acting improperly. Therefore, they argue that the P’nei Yehoshua erred in applying this rule to the situation of a non-creditor taking on behalf of a creditor. If that explanation is incorrect, there is no source that the one who takes for another at the expense of others is acting improperly.
A third reason to permit your neighbor to take bread on your behalf is that he is allowed to take bread for himself. The Gemoro (BM 11A) rules that in this case if a person picks up a lost object on someone else’s behalf the one on whose behalf the object was picked up immediately becomes the owner even though others thereby lost the opportunity to take the lost object. The reason is because the one who picked up the lost object could have taken the lost object for himself. Therefore, when he takes it for someone else that person immediately becomes its owner.
Therefore, if your neighbor, who himself is entitled to take bread, forgoes his right and only takes bread on your behalf, certainly, according to all opinions you immediately become the owner of the bread and your neighbor is certainly acting properly. However, if your neighbor takes five breads for himself and then takes bread for you there is a dispute if you immediately become the owner of the bread that he took on your behalf. The opinion of the Beis Yosef, Shach (105, 2) and Ketsos (105, 2) is that even in this case you immediately become the owner of the bread that he took on your behalf, which implies that he is acting properly when he takes bread on your behalf. While a lot of Poskim including the Sema (105, 3), Bach and Tumim disagree, the Noda Biyehuda (CM 1, 17) rules that since it’s a dispute, if your neighbor gives you the bread loaves you certainly may keep them. Also, if your neighbor first takes for you and then for himself, it is less problematic.
We should note that if you tell your neighbor that you will pay him even just five cents for his help, you will make it even better for yourself since the opinion of the Shach (105, 1) is that when the one who takes the object is an employee, the employer becomes the owner of the object that was taken on his behalf even if others lose. The ruling of the Shach is controversial, but since many do agree with him, it makes your situation even better. This is especially true since the third reason is also a dispute. Therefore, these two disputes together give you a sfeik sfeiko-a double question which is very good since many opinions (see Tosafos in Kesubos 9B) maintain that with a sfeik sfeiko one can even extract money from its owner.
In conclusion: Your neighbor may take bread on your behalf even if he uses his entire allotment for himself. (It is a little better if he takes the bread for you and then for himself or both at the same time.) Your case is even stronger if you pay him even a small amount.