The human heart has two chambers to prevent the mixing of oxygen-rich blood with the blood containing carbon dioxide.
Because both oxygen and carbon dioxide have to be transported by the blood, the heart has different chambers to prevent the oxygen-rich blood from mixing with the blood containing carbon dioxide.
The carbon dioxide-rich blood has to reach the lungs for the carbon dioxide to be removed, and the oxygenated blood from the lungs has to be brought back to the heart.
This oxygen-rich blood is then pumped to the rest of the body.