Mucositis occurs as a side effect of cancer treatments like chemotherapy and radiation therapy. These treatments, while targeting cancer cells, also damage rapidly dividing normal cells, including those lining the mucous membranes. This damage leads to inflammation, ulceration, and increased risk of infection.