Why does a Song for Chanukah have references to other Yomim Tovim?
Maoz Tzur actually mentions all 4 Galuses (exiles) we have gone through. The first stanza starts off with how wonderful it was when we had a Mishkan / Beis HaMikdash. The second stanza talks about Golus Mitzraim. The third stanza talks about Golus Bavel. The fourth stanza talks about Galus Modi. The fifth stanza talks about the Neis of Chanuka. The final stanza is a Tefila to take us out of this final Golus, Golus Edom.