The Midianites merchantmen are the Ishmaelites, and the ones who pull Yosef out of the pit are most certainly the brothers - otherwise, why stress that they sold Yosef for twenty shekels of silver? (And see my previous post for the suggestion that Ishmaelite means nomadic trader, as it means Bedouin in Bereishit Rabba and Shemot Rabba.)
Now, Reuven returns to the pit and is shocked to see Yosef missing (37:29) and returns to his brothers and is upset (37:30). At least that is my reconstruction.
But if Reuven returns to the pit, where was he until now? Rashi mentions two explanations:
But when he (Joseph) was sold, he (Reuben) was not there, for his day to go and serve his father had arrived (Gen. Rabbah 84:15). Another explanation: He was busy with his sackcloth and his fasting for disarranging his father’s bed (Peskikta d’Rav Kahana ch. 25.)The latter is also in Bereishit Rabba, not just in Pesiqta deRav Kahana.
In other words, if Reuven returns, he must be returning from somewhere. Indeed, his astonishment at seeing Yosef missing assumes that he is not present when Yehuda speaks of selling Yosef, or at least when they actually sell Yosef. (Unless we say that it was the Midianites who pulled Yosef from the pit and sold him to the Ishmaelites (who in turn sold him to the Midanites, who sold him to Potifar - see verse 36), and the brothers never actually got to act on Yehuda's suggestion.)
Now our reaction can be "ho hum." Rashi gives two possible explanations. But let us appreciate these two explanations, which he draws from the midrash, a bit more.
Why should we think that Reuven went to serve his father? Since my major thesis is that no detail in midrash comes about ex nihilo, there must be some Scriptural source. This source is 37:22:
vav - לַהֲשִׁיב אֶל-אָבִיו. Reuven's intent was to save Yosef, and perhaps he could do this later by persuading his brothers. However, now was not the time, and so he used a delay tactic. They would throw him into a pit, and Yosef could stay there a while. In the meantime, Reuven would return to his father. It makes sense that Reuven would go to serve his father, for Yosef had been doing this and now had gone to visit his brothers, so someone else should take care of Yaakov. (One perush suggests that they served in cycles from eldest to youngest, and Yosef as the youngest brother (Binyamin being too young), the next in line was Reuven.)
What about the aspect of teshuva? This also appears to be based upon וַיָּשָׁב רְאוּבֵן. But reference is made to changing his father's bed. To explain: In Bereishit 35:22:
Now, literally, וַיִּשְׁכַּב means "lay" or "sleep," not "have sexual intercourse with, and אֶת can either mean "with" or simply deignate the object.
Therefore, וַיִּשְׁכַּב אֶת-בִּלְהָה פִּילֶגֶשׁ אָבִיו can simply mean that he caused Bilhah his father's concubine to sleep - that is, sleep alone. The midrash fills in details that he moved his father's bed, since he thought it inappropriate that his father chose to sleep with Bilhah instead of Leah. This was an inappropriate action, and the Torah judges the righteous harshly for even minor infractions, and so it wrote that he slept with her. At least, that is the way everyone takes it - that the Torah makes up an action that he did not do. In fact, as I just demonstrated, what Chazal mean is not that the Torah does not make up an action, but writes the action in an ambiguous way such that on a straightforward level it looks like he took the far worse action, but the same words can be taken in a much less severe direction. The same with David's sin.
As I mentioned in a previous post, people would not understand the nuance of Reuven's actual action, and so Chazal decided to leave this verse untranslated in shul. Initially these were two separate verses, with a new verse beginning וַיִּהְיוּ בְנֵי-יַעֲקֹב, שְׁנֵים עָשָׂר. They linked the two together, with trup as if it were a single verse, and only had the Aramaic Targum read for וַיִּהְיוּ בְנֵי-יַעֲקֹב, שְׁנֵים עָשָׂר. One these two verses are not merely juxtaposed but also smushed together, the midrashic urge to link them semantically increases even more. Thus, we have that Reuven did teshuva and so Yaakov did not disown him, and Reuven was a valid shevet and part of the 12 sons of Yaakov.
Indeed, we might read that into the verse. For after "returning" from the pit, he "returned" to his brothers - that is, he is once more one of the 12.
Some of this last is obviously speculative.
Midrash in Motion
Upon examination of the sources in Midrash Rabba, I noticed something interesting. The first midrash, about Reuven going to serve his father, is on an earlier verse, verse 21.
meforshim on location explain that וַיִּשְׁמַע implies that he is just now hearing this because he is coming from some other location. Thus the midrash asks "veheichan haya" and answers that he was serving his father. Unlikely. (The meforshim also have difficulty explaining why Reuven was serving his father just now if Yosef was also just serving his father.)
Meanwhile, this verse is much earlier in the story, well before the sale of Yosef - this is before Yosef even arrives. Thus, when Rashi cites this midrash as a reason Reuven was not present at the sale, he reinterprets the midrash, for according to the standard explanation Reuven would have already arrived after serving his father, and would have been present at Yosef's sale.
I do not think Rashi is reinterpreting the midrash, but rather is the only one among the meforshim who understands it correctly. There is no reason to ask veheichan haya on the word וַיִּשְׁמַע. And the phrase veheichan haya is repeated later, when the answer was that he was in his sackcloth doing teshuva. Rashi realized that both midrashim were really based on the pasuk of וַיָּשָׁב רְאוּבֵן.
Why then was it placed on an earlier pasuk? Rashi does not say, but I did: Because of the detail of returning to his father, which is deduced from the continuation: לַהֲשִׁיבוֹ אֶל-אָבִיו.