It is a matter of the right choice
The point is that some chemicals are more compatible with certain plants than with others. Moreover, there are some pesticides that become dangerous only in a certain situation, but the growers do not always consider this fact.
The best example is Eagle 20―the pesticide that is commonly used by the companies who are growing medical cannabis or recreational weed. It helps the growers of various vegetation to get rid of mites and mildew, but it is allowed to use the product only on the plants that will never be inhaled. Why is it so important not to inhale a plant covered by Eagle 20? Because this substance contains myclobutanil―a chemical that produces hydrogen cyanide gas when it burns. This is why this pesticide was forbidden to use with tobacco.