According to HealthHype.com, natural oils in the hair attract dirt and bacteria, which causes hair to smell. The bacteria feed on dead skin cells and emit offensive odors in the process. Bad hygiene and environment contribute to bad-smelling hair as well.
HealthHype.com further notes that poor hygiene of the hair involves infrequent washing, which leads to a build-up of excess materials on the skin. There are those who wash the hair to maintain a certain hairstyle, but doing so exposes the hair to offensive odors.
HealthHype.com mentions that certain skin conditions such as scalp psoriasis and seborrheic dermatitis foster a haven for unwanted microbes on the scalp. The diseases aren't responsible for odors in the hair, but the bacteria that festers is the root cause. Dryness of the skin and dandruff are other skin issues that can lead to bacteria growth and foul-smelling hair. Chemical relaxers and other hair products attract additional microbes. People who maintain weaves and extensions are especially prone to bad hair smells.
Wearing a cap or scarf over the head is another factor that spawns offensive odors in hair, according to HealthHype.com. Pollutants in the air and water quality are other factors that attract unwanted elements in the hair. Covering the hair less and exposing the head to direct sunshine more often reduces hair odors. Washing hair regularly gets rid of excess dirt and microbes.