When earring holes smell, it is usually a result of sebum, a natural secretion of the sebaceous glands. Sebum is oily and, when mixed with dead skin cells and bacteria, can produce a foul-smelling discharge that smells like old cheese.
The smell of sebum is a natural smell but one which some people find unpleasant. The smell of each person's sebum is slightly different and is part of what makes an individual identifiable to a dog. When people find a natural human scent, such as sebum, unpleasant, it is often because the person doing the smelling has an immune system similar to that of the person whose body is creating the scent.
The unpleasant smell from earring holes can be exacerbated by the presence of an infection. Body piercings can become infected easily if piercing equipment isn't sterile, earrings are too tight or earrings have rough posts that scratch the inside of the earring hole. Some people also respond badly to posts including nickel, making them vulnerable to infection.
Treat inflamed or infected earring holes by soaking them in a solution of 1 tablespoon sea salt to 8 ounces of warm water. Swabbing the area is a good way to apply the solution. Wash hands with antibacterial soap before touching the earlobes. Dry ears with paper towels to avoid introducing bacteria to the earring hole via a hand towel.