The mishnah states that according to Beis Shammai you may use your hands to pick up and remove bones and shells from a table on Shabbos, while according to Beis Hillel you may not pick up the bones and shells with your hands. Rather, you must lift up the table top and spill the refuse off of it without coming into direct contact with the bones and shells. Rav Nachman in the Gemara reverses the opinions, attributing the lenient opinion to Beis Hillel and the stringent opinion to Beis Shammai.
Rashi (d.h. Atzamos) explains that the bones under discussion in the mishnah are “hard, that are not suitable for a dog.” Tosafos (d.h. Atzamos) reject Rashi’s interpretation. They assert (and cite proof) that you may only use your hands to pick up bones if they are suitable for an animal to consume.
Nachalas Yaakov (to Beitzah 2a, Tosafos d.h. Magbihin) sustains Rashi’s interpretation. He does so on the basis of Darchei Moshe (Orach Chaim 308:10), who writes that you may move refuse — viz., bones and shells — that is suitable for animals that are in your home on Shabbos, even if the refuse became separated from the food before Shabbos began. On the other hand, you may not move refuse that is only suitable for dogs who are to be found in the marketplace (not in your home) unless it became separated from the food on Shabbos itself. (Nachalas Yaakov suggests that the rationale of the latter ruling is that anything that was categorized as food for a part of Shabbos — viz., the bones and shells while still adhering to the meat or the nut — retains its categorization as food so long as it is still suitable for a dog.)
Nachalas Yaakov explains that the distinction made by Darchei Moshe underlies our mishnah’s structure, in which bones and shells are discussed separately from the pods of legumes. The separation indicates an essential difference: The bones and shells under discussion are only suitable for large dogs, and generally large dogs are not present in a home. Hence, in order to permit carrying these bones and shells in one’s hands, they must have been separated from the food on Shabbos itself. Pods, on the other hand, are suitable even for the small animals that are generally present in the home. Hence, they may be carried by hand even if they had become separated from their food before Shabbos began.
Taking Darchei Moshe’s distinction further, Nachalas Yaakov suggests that when Rashi writes that these bones are hard and not suitable for a dog, he means that they are the type of bones that are not suitable for the small dogs that are generally present in the home. They are suitable, however, for the large dogs one finds in the marketplace. Thus, our mishnah reflects Darchei Moshe’s latter ruling.