Among the materials needed for the Mishkan were “orot eilim me’odamim” – reddened rams’ skins (25:5), which were used as a covering for the Mishkan (26:14). Rashi interprets the term “me’odamim” to mean that the skins were dyed red after the rams were slaughtered and skinned. This interpretation is in contrast to the view of the Talmud Yerushalmi (Shabbat 7:2), which writes, “Hayu mesharbetin ba-beheima,” which is commonly interpreted to mean that the animals were beaten before they were slaughtered until they bled internally. The internal bleeding had the effect of coloring the skins, and this is how the skins were dyed red.
To explain why Rashi did not follow the Yerushalmi’s interpretation, Rav Chaim Kanievsky, in his Ta’ama Di-kra, suggests that the issue hinges on a debate among the Tanna’im. The Gemara in Masekhet Menachot (42b) cites two views as to whether the dyeing of the fabrics for the bigdei kehuna (priestly garments) had to be performed lishmah – with the specific intent for the mitzva. According to one view, the person who performed the dyeing had to have in mind at the time of the act that this was done for the specific purpose of the bigdei kehuna. It stands to reason, Rav Kanievsky surmises, that this view would likewise require lishmah for the coloring of the rams’ skins used to cover the Mishkan. (Indeed, the Gemara applies this debate to the question of whether the tekhelet dye must be applied to tzitzit strings with specific intent for the mitzva, clearly indicating that this debate is not limited to the specific context of bigdei kehuna.) If so, then this debate might directly affect the question of how the rams’ skins were dyed. Rav Ovadya of Bartenura, in his Torah commentary, cites a version of the Yerushalmi stating that the rams had to be beaten when they were very young, presumably because the skins would otherwise not become permanently red. Now the term “eilim” refers specifically to adult rams (as Rav Kanievsky cites from the Mishna at the beginning of Masekhet Para). According to the Yerushalmi, then, the rams’ skins used in the Mishkan had to have been dyed sometime before the command for the Mishkan was issued. After all, the beating had to have been done when the rams were young, and the materials were all donated in the two days following Moshe’s command to the people to supply materials for the Mishkan (as we read in Parashat Vayakhel). As such, the “dyeing” could not possibly have been performed lishmah – for the same of the Mishkan – because the command had not yet been given. Hence, the Yerushalmi necessarily worked off the assumption that the dyeing does not have to be performed lishmah. Rashi, it seems, embraced the position that dyeing indeed must be done lishmah (which is, in fact, the accepted position with regard to tzitzit – see Rambam, Hilkhot Tzitzit 2:3). Therefore, he was compelled to explain that the rams’ skins were dyed after they were removed from the animals, and not in the method described by the Yerushalmi.
It should be noted, incidentally, that the Penei Moshe commentary to the Yerushalmi explains the phrase “Hayu mesharbetin ba-beheima” differently. He writes that the rams were not beaten, but were rather marked with permanent ink as a sign of their designation for the Mishkan. Rav Menachem Kasher, in Torah Sheleima, addresses this issue at length and dismisses the notion that Benei Yisrael were required to beat the rams to cause internal bleeding, something which would certainly strike us as a cruel and bizarre method of dyeing skins.