The CO2 is completely confined in the laser device and is used to produce the laser beam by excitation of the CO2 gas atoms. The CO2 gas would not touch the object. The object was burnt because of the high intensity of the laser beam, which is a beam of infrared radiation.
In fact, CO2 laser was one of the earliest gas lasers to be developed and is still one of the most useful. CO2 lasers are the highest-power continuous wave lasers that are currently available
The CO2 laser produces a beam of infrared light with the principal wavelength bands centering around 9.4 and 10.6 micrometers. Because of its high power output, CO2 lasers are widely used in industry for cutting and welding purposes.