Space is not very far away. Aircraft on long-haul flights travel at a height of about 10 km. The Troposphere ends at about 15 km, and the air in the upper atmosphere is very thin indeed. Think of a place around 15 km (9 miles) from where you are. That's pretty much how near you are to space. All the waste gases dumped into the air are basically trapped in the thin layer of air around the Earth.