Because for each glucose molecule there are two pyruvic acid molecules entering the system, two ATP molecules are formed. Also during the Krebs cycle, the two carbon atoms of acetyl-CoA are released, and each forms a carbon dioxide molecule.
Hope this helps