The mishna Keilim 9:2 records a disagreement between Beit Hillel and Beit Shammai, and then records that Beit Hillel retracted their opinion and agreed with Beit Shammai.
חבית שהיא מלאה משקין טהורין, ומניקית בתוכה--מוקפת צמיד פתיל, ונתונה באוהל המת--בית שמאי אומרין, החבית והמשקין טהורין, ומניקית טמאה; בית הלל אומרין, אף מניקית טהורה. חזרו בית הלל להורות כדברי בית שמאי.
A jar that was full of clean liquids, with a siphon in it, and it had a tightly fitting cover and was in a tent in which there was a corpse: Bet Shammai says: both the jar and the liquids are clean but the siphon is unclean. And Bet Hillel says: the siphon also is clean. Bet Hillel changed their mind and ruled in agreement with Bet Shammai.
[Hebrew from Mechon Mamre, English from Sefaria]
Why was Beit Hillel's original opinion included here? Why not just include Beit Shammai's opinion (perhaps anonymously)? A similar question can be asked for Ohalot/Ahilot 5:3–4, where the same occurs.
Note that this also occurs in several other places: Yevamot 15:2–3, Gittin 4:5, Eduyot 1:12–14, that I know of. However, in these additional cases, there is a discussion between Beit Hillel/Shammai that precedes the retraction, and hence it's understandable why Beit Hillel's original point of view was included. I admit that some discussion of the Keilim/Ohalot cases are included in Eduyot, but the question remains of why they're taught in such a manner in Keilim/Ohalot.