The answer to 'why is my carpet odor' is that there can be several common causes, including pet accidents, spills, mold/mildew, and general dirt and debris buildup. Carpet odors are often a sign that your carpet needs a deep cleaning to remove the source of the smells.
Carpet odors can range from mild mustiness to strong, unpleasant smells. Causes can include pet urine or feces, spilled liquids that have soaked into the carpet, mold or mildew growth, and simply accumulated dirt, dust, and debris over time. The odor may be localized to a specific area or spread throughout the room.