Shalom everybody, We read lately Parashat Pinchas. The parsha deals with the story of B'not Tzelofchad (Barmidbar 27:1-11). Rashi on verse 27:3 quotes the Gemara Shabbat 96b in order to identify who Tzelofrad was and what he did wrong. Rashi says that according this Gemara, there is a machloket between Rabbi Akiva and Rabbi Shimon. But if you go on Daf 96b of tractate Shabbat, the machloket is between Rabbi Akiva and Rabbi Yehuda ben Beteirah. How can we explain this discrepancy? Regards,
Perhaps Rashi attributed the position that Tzelofechad was not the "collector of sticks" (R' Akiva's position) but one of the "Ma'apilim" who prematurely stormed Cana'an in Num 4:14 based on a source in the Midrash rather than on Shabbat 96b-97a.
First, it's not clear that the Gemara in Shabbat associates this position, in particular, with R' Yehuda ben Beteira. The direct quote from R' Yehuda there was about taking exception to R' Akiva's position that Tzelofechad was the stick-collector and implying a position of uncertainty on that score. The Gemara continues by offering the alternative, that he was one of the Ma'apilim, but that could be an anonymous follow-up, rather than the position of R' Yehuda himself. (This is how it's interpreted in the William Davidson Talmud on Sefaria, linked above.)
רבי אליעזר בן יעקב אומר נאמר כאן מדבר ונאמר להלן ויהיו בני ישראל במדבר מה כאן צלפחד אף להלן צלפחד. אמר ליה רבי שמעון אפשר לומר כן מקושש בשנה ראשונה שיצאו ממצרים בשנים ועשרים לחדש השני וכי אפשר שהיו בנות צלפחד בנות מלכים נאות וכשרות הקטנה שבהן יושבת ארבעים שנה ולא נשאת וכי באיזו שנה מת צלפחד בשנה שנאמר וישמע הכנעני.
There, we have the position that Tzelofechad was the stick-collector attributed to R' Eliezer ben Ya'akov and rejected by R' Shimon. R' Shimon doesn't object to the propriety of this association, like R' Yehuda in the Gemara, and assert uncertainty; he rejects the association based on how the timeline works out. So, while we don't see there that R' Shimon offers the Ma'apilim association as an alternative, we do see him as a strong opponent of the stick-collector association.
Perhaps Rashi had access to a statement in the Midrash where R' Shimon did provide the alternative association; the Yalkut Shim'oni quoted this statement partially, leaving out the alternative association; and the original statement is otherwise lost to us now.