Smoking volatilises active compounds but may also degrade them
Many active ingredients in drugs are volatile alkaloids readily absorbed through the mucus membranes in the mouth, nose, and lungs. Nicotine, THC, and heroin are good examples of varying legality.
The reason why smoking is often used to deliver them is that smoking is a convenient way to deliver the volatile active ingredients into the body. Sure, burning will degrade some of the active ingredients in a cigarette, but burning the tip of the cigarette causes hot air to be drawn through the unburnt portion of the device which releases the volatile active ingredients in the unburnt part. This is convenient, though dangerous as many of the less desirable contaminants are also created as a side effect of burning. This is why cigarettes kill: it isn't the desired nicotine but the side effects of burning and the other, undesirable, ingredients that are also released in the volatilisation process. And, burning may destroy some of the active ingredients (though most users will get enough for this not to matter much).
This is also why electronic cigarettes can deliver nicotine relatively uncontaminated by those other products and are, often, effective substitutes for getting nicotine into addicts far more safely than via burning sticks of tobacco (the process of controlled heating can volatilise relatively pure nicotine without the side effects of less controlled burning and the source can be far purer than tobacco leaf).
Similar considerations apply to other active ingredients.
So, the bottom line is that, yes, burning is usually bad but mostly because it is not a very controlled way to deliver active ingredients. We use it because it is convenient and easy despite its drawbacks.