As we have learned, according to the Torah in Parashat Mishpatim (Shemot chapters 21-22) someone who steals an animal or an object will pay back twice the value of the object he stole (see Shemot 22:6-8) as a penalty – a kenas. If he stole an ox (shor) or a sheep (seh) and killed them or sold them he will pay back five times the value of an ox and four times the value of a sheep (see Shemot 21:37).
According to our Mishna (74b) if a person stole an animal, consecrated it to the Temple (in a manner that actually takes effect, e.g. after the original owner had despaired of ever getting it back, effectively giving up ownership of it) and then killed it, he will not be obligated to pay four or five times the value of the animal. The Gemara suggests that it is obvious that he will not have to pay the kenas, since by that time the animal no longer belonged to the original owner, as it had been transferred to the Temple. The question raised by the Gemara, however, is why consecrating it to the Temple does not fall into the same category as selling the animal, and the thief should already be obligated to pay the kenas at that point.
In answer to that question the Gemara distinguishes between transfer of ownership from one person to another, where all rights and responsibilities switch to the new owner, and consecrating an animal to the Temple, where some level of ownership is retained by the person who declares the animal to be hekdesh.
Tosafot explain that this statement in the Gemara is true of animals that are consecrated for the purpose of sacrifice; they retain a connection to their owner who will bring them as a sacrifice. If, however, the animal was given to the Temple for bedek ha-bayit – as a monetary gift to be sold or used in the Temple – this would not be true. The Ri”d argues that even bedek ha-bayit remains connected to the original owner in a unique way, as evidenced by the fact that the owner would need to pay a 20% premium if he decides to redeem the animal from the Temple, while anyone else purchasing it for the Temple treasury would pay its normal value.