Since the miracle of the oil of Chanukah was that from one flask of oil they miraculously had enough oil for the menorah to burn all night for eight days, why did Chazal require us to light only for about half an hour, and not the whole night?
My understanding the reason chanukah candles are not required to burn the entire night is tied to the difference between chanukah candles and shabbos candles. Shabbos candles are to provide light and one would expect them to burn a long time (the whole night), but chanukah candles are specifically not to provide light, but to remind us of the miracle that occurred. That is why we have a shammas, so if we do inadvertantly use the chanukah candles for light, we can say we are just using the shammas for that. By only requiring the candles to burn for 30 minutes, that reinforces that the we are not using the candles to provide light.
Referencing an article in the latest "Torah To-Go" published by Yeshiva University for Chanukah 5774, Rabbi David Palmer writes in his article "Let There be Points of Light", he states, "According to the Rosh, the Chanuka candles are not meant for illumination, but to be points of light for us to notice them. Since candles typically function as sources of illumination, the Chanuka candles are apt to be misconstrued as lights, which they aren't supposed to be; rather, they are supposed to be markers, or indicators, or signs. The Chanuka candles are intended to advertise the miracles of Chanuka. We view the Chanuka candles the way we view yizkor candles or yahrtzeit candles: as objects that we take note of, that remind us of something. This only works when the significance of the candles is evident. But when they are seen as lights, as illumination, then they fail as reminders."
As to the specific timing, I was always taught that in ancient times, passers by would still be returning home during the first 30 minutes after dark, but after that, there would not be as many people to whom you would advertise the miracle.
The Admor Meostrovtze offers a fascinating explanation as to why Chazal decided that we should light Chanuka candles for specifically half an hour.
Each Chanuka a person lights 36 candles in total (excluding the Shamoshim). If we light each candle for half an hour, there is a total of 18 hours of Chanuka candles burning each year. Since a person’s lifespan is seventy years (as it says in Tehillim:ימי שנותינו בהם שבעים שנהם) one lives through 1260 hours of candles burning (18 X 70 = 1260). This corresponds exactly to the amount of hours the miracle occurred during the original Chanuka:
It is known that one of the candles in the (the "Ner Maaravi") would always burn miraculously throughout the day, after the other six candles had burned out. To calculate the amount of time the Chanuka miracle happened we need to exclude the daytime burning of the Ner Maaravi since that would always experience a miracle and is not unique to Chanuka. Therefore the calculation is as follows:
The other six candles burned for 24 hours a day for eight days, a total of 1152 hours (6 X 24 X 8 = 1152). The Chanuka miracle with the middle candle occurred only during the night. According to the opinion that is from צאת הכוכבים till שקיעת החמה is one and a half hours, the length of the night is 13 ½ hours. Thus the miracle of for the middle candle during the entire Chanuka lasted 108 hours (13.5 X 8). If we add that to the 1152 hours the other six candles burned for, the total amount of time for the miracle of Chanuka was 1260 hours (1152 + 108), exactly the same amount as the amount of hours one lights Chanuka candles throughout his life!
The sefer מאיר עיני חכמים answers this question as follows:
First we have to answer a different question - why did Chazal establish this festival of Chanukah with praise and thanksgiving because of the open miracle which they experienced at that time, that one day’s worth of oil miraculously lasted for eight days? Surely they saw such a miracle on a daily basis with the Ner Ma’aravi, which only had enough oil to last the whole night like all the other lamps but nevertheless miraculously burned the whole day! How was the miracle of the oil of Chanukah different from the miracle that they were accustomed to witness every day?
To answer this question we first need to remember that every day the Kohanim had to put enough oil in each lamp so that they would burn the whole night until the morning. And because there is a question as to whether the period of bein hashmoshos (twilight) is day or night, they needed to light the menorah before this time, and Chazal calculated that the total amount needed was half a log of oil, and so this was the amount which they placed in all the lamps (including the Ner Ma’aravi) each day before bein hashmoshos. Thus, the amount of time that the Ner Ma’aravi miraculously burned during the day was a whole day (12 hours) minus the length of bein hashmoshos.
Returning to our original question, if Chazal had wanted to establish the festival of Chanukah because of the miracle that the oil burned all night for eight days, they certainly would have commanded us to light the whole night as a remembrance of the miracle. But if they had done so it would not have been very clear that we are celebrating the special miracle of Chanukah, since part of this time period - 12 hours minus bein hashmoshos - was a miracle they saw every day with the Ner Ma’aravi.
Therefore, Chazal instead wisely established the lighting of Chanukah lights for the amount of time that the miracle of the oil of Chanukah exceeded the miracle of the Ner Ma’arvi. This works out to be twice the time period of bein hashmoshos, because the Ner Ma'aravi miraculously stayed alight for 12 hours minus the period of bein hashmoshos, but during the eight days of Chanukah the lamps miraculously stayed alight for 12 hours plus the period of bein hashmoshos. Thus it is now clear why Chazal commanded us to light the Chanukah lights for a period twice that of bein hashmoshos, which is approximately half an hour.
The full text in English can be found here, and it is well worth a look because he goes on to explain how the three opinions as to the amount of time we are required to light the Chanukah lights are precisely in accordance with the three opinions as to the length of bein hashmoshos.