The evolved response to CO2 is part of the human body’s ability to filter and remove CO2 via the respiratory system. AFAIK we don’t have similar capacity for Nitrogen because it’s not a primary waste product of that system.
We evolved to detect CO2 because that's by far the easiest thing to detect that's still a reasonable proxy for the performance of our respiratory system