Our Gemara quotes Mishnayot in Massekhet Shekalim (4:7-8) that discuss a case where someone announces that he is donating all of his possessions to the Mikdash. In such a case, the property is usually given to the Temple treasurer for general upkeep – bedek ha-bayit. But what if some of his possessions can be brought as sacrifices?
If some of the possessions are animals that can be brought as sacrifices, there is general agreement that such an animal should be sacrificed, as that was most probably the intent of the donor. Furthermore, the korban should be brought in such a way that it is entirely donated to the Temple, with no part of it going to the owner. Therefore, all agree that the animals that can be brought as olot should be sacrificed. There is a difference of opinion, however, with regard to those animals that can be brought as shelamim – korbanot that are divided between the altar, the kohen and the owner. According to Rabbi Eliezer, such an animal should be sold to someone who will use it as a shelamim, and the proceeds should be given to the Temple treasurer together with all the rest of the possessions. Rabbi Yehoshua agrees that such animals should be sold to someone who will sacrifice them as a shelamim, but, he says, the proceeds of the sale must be used to purchase olot.
If some of the possessions are not sacrificial animals, but they can be brought on the altar – for example, wine, oil, or fowl – Rabbi Elazar rules that they should be sold to someone who will use them on the mizbe’aḥ for its appropriate purpose, and the proceeds should be used to purchase olot that will be burned on the altar. In this case the Mishna does not record any argument.
The Rambam records this in his Mishneh Torah (Hilkhot Erkhin 5:8-9) and rules like Rabbi Eliezer in the first case, so that the money received from the sale of the animals that cannot be brought as olot will be given to the Temple treasurer for general use. This creates an odd situation that the Rambam feels obligated to explain. In the first case in the Mishna, animals that could be brought as shelamim are sold and the proceeds are used for bedek ha-bayit. In the second case, other items brought on the mizbe’aḥ are sold, but the proceeds from that sale are used to buy sacrifices!
He explains (based on the passage in Vayikra 27:11-12) that only animals can be evaluated for the purpose of redemption. As such, the animals in the first case can truly be redeemed, and their value can be used for the relatively mundane purposes of bedek ha-bayit. The wine, oil, etc. in the second case cannot be redeemed, so the money retains the original holiness and must be used for actual sacrifices.