In a word, “Yes”. As Cannabis is an organic, living plant, it can “go bad” in many stages, from growing to the final product. During the cannabis growth cycle, farmers must check for mold, mildew, pests, nutritional deficiencies, bud rot and many other issues. Then, once the final product is made (flowers, concentrates etc.), it must be tested for chemicals and pathogens (bacteria, spores etc.).
Source