When someone donates an animal to the Temple as a sacrifice, it immediately becomes fully sanctified and cannot be redeemed, that is, it cannot be exchanged for money and used for mundane purposes, since it must be brought on the altar. If, however, it developed a blemish that will not allow it to be sacrificed, the Torah permits it to be redeemed, and another animal must be purchased as a replacement (see Vayikra 27:11-12).
The Mishna that opens the twelfth perek of Massekhet Menaḥot deals with questions of redeeming other sanctified items. We learn that meal offerings and libations can be redeemed so long as they were not placed in a keli sharet – a Temple vessel that would give them full sanctity. Once they were placed in a keli sharet, however, they cannot be redeemed even if they became ritually defiled and cannot be brought as an offering. Similarly, sacrifices brought from fowl, or wood sanctified for use on the altar or frankincense or a keli sharet that became ritually defiled and cannot be brought or used in the Temple, cannot be redeemed. These items will have to be destroyed, since the concept of redemption appears in the Torah only with regard to animal sacrifices that cannot be brought on the altar.
The Gemara on today’s daf teaches that the restriction on redeeming the last three examples – wood, frankincense and Temple vessels – is Rabbinic in origin, and that on a Biblical level they can be redeemed, even if they did not become defiled and were fully usable. The rule forbidding their redemption was established because these things are hard to find, and if they could be redeemed, the Temple may find that it does not have enough of these items.
In response to this the Gemara argues that although one may think that wood is readily available, since wood with worms cannot be used on the altar, such wood is hard to find.
The Meiri suggests two reasons why wood with worms cannot be used on the altar. One possibility is that only things that can be eaten by Jewish people can be burned on the altar; this would disqualify wormy wood. The other possibility is that they are simply disgusting, and that it would disgrace the altar to place such wood on it.