The answer is it is a waste product produced by cellular respiration. During Gas exchange in the lungs, oxygen replaces carbon dioxide, and oxygen, oxygenates blood that spreads throughout the body, the Carbon Dioxide, which is expelled from the lungs originated from the cellular respiration, which occurred inside the body.