well, it is not just energy. Here is an example from glycolisis:
you break glucose anaerobically - you get 2 ATP and 2 NADH and 2 pyruvates, so seems like you got 8 ATP (NADH = 3 ATP)
but then bacteria actually convert pyruvate to alcohol and spend these 2 NADH. WTF? Why do they do that? It is because the amount of NAD is limited, so if you keep splitting glucose you run out of NAD. Normally NADH is converted to ATP by giving H to oxygen. But without oxygen you can't get even the 2 ATP that you were able to get before, because all your NAD is NADH. So they have to waste 2 perfectly good NADH.