I understand. So why not ask the question before the gemara starts discussing about the core mitzvah and mehadrin and Bais Shamai and Bais Hillel. At that point it seems like the gemara is done discussing the wicks and on to a new topic.
The Gemara was already involved in the halachos of lighting the menorah, because "Kovsa zakuk lah" was also relevant to the rules of the wicks and the fuel, so the Gemara continues to discuss the rules of lighting. Then the Gemara goes onto the discussion of "Mai Chanukah".
The Gemara is not organized in the same way the Rambam and the Tur were organized.
The Gemara is a collection of discussions of the Amaraim, organized around the mishnayos. There are some discussions of the Amarai'im that simply have no great place to put them. Such as many agados. But they have to be placed somewhere. Many times the Gemara will find any excuse to place them, such as the same Amora that said the last thing, said another thing totally irrelevant. (I believe that's why Brachos has the most Agada, because the first excuse the Gemara finds to place a discussion, it places it).
The Gemara is not usually concerned with placing these discussions, in a "foundations" first method. In many Perakim in Shas the most foundational points are found very deep into the perek. The Gemara's order is more based on, first expounding the Mishna, and then bringing discussions that are most similar to the last discussions.
I don't recall reading this anywhere, so I may be wrong. But this is what I believe to be true.