The thing that's confusing you is that this equation skips a step. The first step is:
Glucose
![Rightwards Arrow](https://biology-forums.com/Smileys/default/27a1.png)
2 x pyruvate sugars (3C) -this is glycolysis & produces H+ that is then used to form ATP:
C6H12O6
![Rightwards Arrow](https://biology-forums.com/Smileys/default/27a1.png)
2 C3H3O3 + 6 H+
In aerobic respiration, the pyruvate then enters the Krebs cycle and is eventually turned into CO2 and water. However, if this cannot happen because of a lack of O2, which don't forget is the electron acceptor right at the end of the electron transfer chain, and without which the whole Krebs cycle backs up, it is instead turned into lactate (C3H6O3), because the free H+ have nowhere to go.
In animals, it stops there, which is why we get a build up of lactic acid causing muscle fatigue. But in yeast, there is another step:
C3H6O3
![Rightwards Arrow](https://biology-forums.com/Smileys/default/27a1.png)
CO2 + CH3-CH2-OH
This is why yeast can respire for long time periods anaerobically and why there is some lactic acid build-up during yoghurt making - the process will happen in equilibrium, so there will be a balance of lactate and ethanol/CO2. Obviously there will be more of the latter as it is constantly being removed, hence it is the main product.
Hope that helps!