What is the Purpose of Respiration?

The purpose of respiration in most organisms it to transfer out bad air and transfer in good air. So in humans that is oxygen rich in and carbon dioxide rich out. Of course, with plants the opposite is true.