Many causes. Deterioration of the normal chemical constituents. Microbial growth. Contamination with any number of things.
The vast majority of known chemicals have no odor at all. The chemical compounds that have an odor are generally small organic molecules with up to 15 or so carbons, and a limited number of polar functional groups. Above that the odors (if any) are faint and the chemical is too heavy to evaporate quickly. Oily liquids become more viscous. Pheromones, perfume bottom notes, and musks are examples
The worst off-odors from microbial growth derive mainly from breakdown of the product’s protein and fat/oil, not the carbohydrates.
Petroleum hydrocarbons – usually refined into distinct fractions or ‘cuts’ in narrow boiling point ranges. The smallest hydrocarbons are practically odorless (methane, ethane, propane and butane) and they are gases at room temperature.
Pesticides: Most pesticide molecules are too large or have too many polar functional groups to possess any odor. Some exceptions are the sulfur-containing (phosphorothio) compounds, and some of the smallest volatile organochlorines (i.e. fumigants). Many familiar insecticides are diluted down to a usable concentration in petroleum solvents or distillates. They are fully effective in highly dilute solutions, often 1% active ingredient. For example, in bug sprays for home and garden use, what we are smelling is the petroleum “carrier”. Most of the pyrethrin canned bug spays have petroleum alkane distillates in the C11 to C14 boiling point range and have no aromatics or PAHs and not many alkenes (as measured by GC and GC-MS).
Sulfur odors and sources
Lipids – fats/oils. Off-odors derive mainly from fatty acid breakdown and oxidation. PUFAs are most susceptible because of all the double bonds.
Nitrogenous compounds – proteins, amino acids, amines, heterocycles
Terpene breakdown products (monoterpenes), turpentine, Pine-Sol, isoprenes
Musty odor – 3 main chemical families