Learning the daf today in the kollel, R. Menachem Levine asked why it is it that the bracha of שעשה נסים לאבותינו comes before the bracha of שהחיינו. It makes sense that we make the bracha of להדליק נר של חנוכה first based on the gemara in Succah 56a that שהחיינו comes after לישב בסוכה because the mitzvah of the day comes first, even though שהחיינו has the advantage of being tadir (more common). Here too, the bracha of l'hadlik is like the bracha of lei'shev ba'succah and should come first. But shouldn't the bracha of z'man which the gemara considers to have an advantage of tadir (over lei'shev) come before the bracha of she'asa nissim which is certainly less common?
In fact, the Maseches Sofrim 20:6 actually puts the she'asa nissim after she'hechiyanu. The order that we have is based on Rashi, Rambam, Rosh.... who all seem to assume that she'asa nissim should precede she'hechiyanu.
The Maharsham (notes in back) points you to the She'iltos D'rav Achai (Vayishlach, 26) where the order is also first שהחיינו and then שעשה נסים like the maseches sofrim. The Netziv in his commentary on the she'iltos writes that he thinks the bracha of שעשה נסים also qualifies as the חיובא דיומא which the gemara says in Succah 56a earns it first place in the order and trumps the advantage of tadir. Although he doesn't explain why he considers שעשה נסים לאבותינו to qualify as חיובא דיומא, the obligation of the day, there are two possible approaches (both were suggested today in our Beis Midrash, R. Noy and R. Apt, respectively). One approach is that the bracha of she'asa nissim becomes a bracha that is closely tied to the mitzvah of lighting chanuka candles. Although the shehechiyanu is also tied to the act of the mitzvah, not the kedusha of the day (see Biur Halacha 692:1 citing Mor U'ktzia - Rav Moshe has a teshuva where he strongly rejects the position of R. Yacov Emden), nonetheless, it is less connected to the performance of the mitzvah than the bracha of she'asa nissim (perhaps because shehechiyanu is very generic and said in many cases for many different reasons). A second approach, and one that I think is more plausible is that the gemara tells us that Chanuka was instituted as ימים טובים בהלל והודאה, actually making no mention of the mitzvah to light candles. Rashi says - ולומר על הנסים בהודאה. Of course Rashi is referring to the al hanisim of shemneh esrei, but the fulfillment of this hoda'ah is also achieved through the bracha of שעשה נסים לאבותינו בימים ההם בזמן הזה, therefore it qualifies as חיובא דיומא even though if it is not at all connected to the mitzvah of lighting candles.
The Netziv cites a k'sav yad of the she'iltos where he seems to compromise and say that one who is lighting makes שעשה נסים first, but one who is making a bracha on the seeing of the candles makes shehechiyanu first. The Netziv explains that the one lighting has begun the obligation of the day, therefore he is supposed to first finish with the obligations of the day before making she'hechiyanu. That is why he says שעשה נסים first. But one who is making a bracha on simply seeing the lights, would make the bracha that is more tadir, namely she'hechiyanu.
Another interesting issue regarding the brachos is a machlokes cited by the Ritva whether all 3 brachos should be made prior to lighting (as we do based on the Rama 676:2), or make the bracha of l'hadlik prior to lighting, then light and only after lighting make the other two brachos. The second opinion seems to hold that whether one is lighting himself or seeing the light of someone else, the brachos of she'asa nissim and she'hechiyanu are made on the seeing of the light and therefore must be done after it is lit. But, the first opinion who holds that all 3 brachos are made prior to lighting, seems to hold that all 3 brachos are made on the act of doing the mitzvah. It is only when one doesn't get to do the mitzvah do we still give him the opportunity to make brachos on just seeing the light.
This may be dependent on another machlokes (also cited by the Ritva). One who hasn't yet lit, but intends on lighting later, should he make the brachos of she'asa nissim and she'hechiyanu when he sees the candles of someone else burning (Rashi), or should he wait to make the brachos on his own lighting at home [The Ran goes a step further and says that even if one will not hear brachos because he is travelling but they are lighting for him at home, he still doesn't make brachos on seeing someone else's candles burning]. Rashi understands that even when one lights, they are essentially making she'asa nissim and she'hechiyanu on the seeing of the candles burning, not on the doing of the mitzvah, therefore they may as well make the brachos on seeing someone else's candles burning. But the other opinion holds that when they actually perform the mitzvah, the brachos are being made as part of birchos hamitzvah (and all should be made עובר לעשייתן), which is more ideal than simply making the brachos on seeing candles burning.