The lungs and other organs of the respiratory system bring oxygen into the body and release carbon dioxide into the atmosphere. ... Gas exchange helps maintain homeostasis by supplying cells with oxygen, carrying away carbon dioxide waste, and maintaining proper pH of the blood.