In the events of Chanukah, why did they need the miracle of the oil? After all, they did not need pure [Tahor] oil, as the Gemara says Tumah Hutrah beTzibur, meaning if everyone is Tumay then you can use tumay oil!
First of all, it's not so simple to say that "tum'ah hutrah betzibbur." There is in fact a halachic argument (Pesachim 77a, et al) as to whether it's "hutrah" (completely permitted) or only "dechuyah" (overridden); according to the latter view, tahor oil should still be used if possible. This is in fact the halachah (Rambam, Beis Habechirah 7:23 and Temidin Umusafin 3:10 passim).
Pnei Yehoshua (to Shabbos 21b) says that technically the miracle of the oil was not necessary, but that Hashem performed it to demonstrate that the Jewish People are precious to Him, and that their self-sacrifice in resisting the Hellenists deserved a special sign of His presence.
I have also once seen another answer (though I don't recall the source) that the rule of "dechuyah" or "hutrah" applies only when the sacrificial service was already being done daily. Here, though, where the menorah was being rededicated and relit for the first time in years (as indeed reflected in the name "Chanukah," dedication) - then that had to be done under conditions of taharah.
Tumah (impurity) was only hutra (allowed) for tumas meis (dead body impurity). This is because of a lack of time, as it states with regards to the nosi (leader of the jews) dying on the day before pesach where everyone would have to go to the tent with the body and become impure, and there wasn't enough time for the 7 day purification process.(see mishna shekolim 8,3).
Tumas zov was not mutar betzibbur this answer is given by the Pri chodosh orach chaim 670, even though contaminating the oil renders it permanently contaminated regardless of whether touched by a meis or zav.
We read famously in maoz tzur: Yevanim nikbetzu alai vetimu col hashmanim (the greeks gathered against us and rendered the oil impure). It doesn't mention dead bodies therefore we have to conclude that this was tumas zov (every gentile is ritually impure like someone with a white seminal emission - gemoro shabbos 18 gezeiras) by carrying the containers the greeks rendered them impure. see tosfos,nimukei Yosef,ran and rabeinu yehonasan on tractate shabbos 21b. Rosh Yosef proves this is the only tumah that a gentile could have rendered a cli cheres (earthenware vessel) impure.
an alternative reason might be that since it was tuma derabonon, it was not hutra betzibbur. only tuma deoraisa like tumas meis is hutra betzibbur
Tuma (ritual impurity) was not permitted betzibbur (for public services) for the oil in the Menora (according to the vast majority of opinions) as it is not sacrificed on the mizbeach (altar).
According to the Tannaim Rabbi Yossi, Rabbi Shimon and Rabbi Yehuda (to the exclusion of Rabbi Elazar who argues) in the Gemora Pesachim 77a:
דכולי עלמא אין הציץ מרצה על אכילות דליכא תנא דשמעת ליה דאמר הציץ מרצה על אכילות אלא ר"א דתניא ר"א אומר הציץ מרצה על אכילות רבי יוסי אומר אין הציץ מרצה על אכילות
Tuma is not Hutra Betzibbur for oil in the Menorah, as it is merely a אכילה-"consumption" of oil i.e it is not sacrificed on the mizbeach.
Only קרבין - "sacrificed parts on the Mizbeach" are permitted once ritual impurity has affected them.
Rashi on Pesachim 77a elaborates:
אינו מרצה על טומאת הנאכלים אלא על טומאת דם וקמצים ואימורים
Only blood, flour taken by kemitza and sacrificial body parts which are all consumed on the altar are permitted in public.
The Rambam Hilchos Beis Hamikdosh 4,7 paskens like these 3 Tannaim: >הציץ מרצה על טומאת דברים הקרבין שנאמר והיה על מצח אהרן ונשא אהרן את עון הקדשים. אבל אינו מרצה על טומאת הנאכלין. >
The Tzitz atones for Tumah of sacrifices that are offered on the Mizbeach As it says "The Tzitz should be on Aharon's forehead forever, and he should remove the sin of Tumah on Kodshim (sacrifices)" But the tzitz does not atone for tumah of the consumed.
I.e something which is not consumed by the altar is called נאכלין, e.g Menora oil, and for something which is consumed by the altar the exclusive word קרבין, "offered up" is used, as in Vayikra 1,2:
אדם כי יקריב מכם קרבן לה' מן הבהמה מן הבקר ומן הצאן
According to Rav in Pesachim 16a, even Rabbi Elazar, who argues with the other Tannaim, holds that tuma cannot be contracted for liquids at all in the Beis Hamikdosh (see Shmuel who argues that liquids are susceptible to tumah according to Rabbi Elazar), so even if the oil was touched by tuma it cannot become tamei, so it would be permissible to use for the Menorah.