Rachel S. Herz, an assistant professor of psychology at Brown University, provides the following explanation:
The simple answer is yes, but the reasons may not be what you expect. Odors do affect peoples mood, work performance and behavior in a variety of ways but it isn’t because odors work on us like a drug, instead we work on them through our experiences with them. That is, in order for an odor to elicit any sort of response in you, you have to first learn to associate it with some event. This explanation for how odors affect us is based on what is known as associative learning, the process by which one event or item comes to be linked to another because of an individual’s past experiences. The linked event is then able to elicit a conditioned response to the original situation. In olfaction, the process can be understood as follows: a novel odor is experienced in the context of an unconditioned stimulus, such as a surgical procedure in a hospital, which elicits an unconditioned emotional response, such as anxiety. The odor then becomes a conditioned stimulus for that hospital experience and acquires the ability to elicit the conditioned response of anxiety when encountered in the future. This mechanism explains both how odors come to be liked or disliked, as well as how they can elicit emotions and moods.
We know that the neurological substrates of olfaction are especially geared for associative learning and emotional processing. The olfactory bulbs are part of the limbic system and directly connect with limbic structures that process emotion (the amygdala) and associative learning (the hippocampus). No other sensory system has this type of intimate link with the neural areas of emotion and associative learning, therefore there is a strong neurological basis for why odors trigger emotional connections.