The Mishna (31b) describes the tevilah (ritual bath immersion) that is done by the kohen gadol on Yom Kippur, and closes with the comment that if the kohen gadol was elderly or particularly sensitive, they would add heated water to the water in the mikveh so that he could immerse himself more comfortably.
It was taught in a baraita that Rabbi Yehuda said: They would heat blocks of iron on Yom Kippur eve and cast them into the cold water of the ritual bath to temper its chill. The Gemara asks: But by doing so, doesn’t he harden the iron, which is a labor prohibited on Yom Kippur? Rav Beivai said: The temperature of the blocks of iron did not reach the hardening point. Abaye said: Even if you say that the temperature of the iron reached the hardening point, the fact that the iron hardened when he placed it in the water is an unintentional act [davar she-ein mitkaven], which is permitted. His intention was to temper the chill of the water, not to harden the iron.
The concept of davar she-ein mitkaven – in which a forbidden act takes place, but the intent of the activity was for a different, and permissible, outcome – is discussed with regard to several halakhot. Specifically with regard to the halakhot of Shabbat there is a concept of melekhet mahashevet asrah Torah – that the Torah only forbade activities on Shabbat where there is intent for the final, forbidden outcome. It should be noted that, even with regard to the case of Shabbat, in a situation where a given activity will, without question, lead to a forbidden outcome taking place, we do not say that it is davar she-ein mitkaven, which would be permitted, but a pesik reisha, which would be forbidden.
Thus, in our case, Abaye’s explanation that we are dealing with a davar she-ein mitkaven will only solve the Gemara’s problem if it is coupled with other reasons to permit it. In our case – as Abaye points out – tzoref (hardening metal) is only a Rabbinic decree. Since we have a principle that ein shevut ba-mikdash – that Rabbinic decrees do not apply in the Temple – it would be permitted.