Aerobic and anaerobic respiration each have advantages under specific conditions. Aerobic respiration produces far more ATP, but risks exposure to oxygen toxicity. Anaerobic respiration is less energy-efficient, but allows survival in habitats which lack oxygen.
Within the human body, both aerobic and anaerobic respiration are important.