Their reactions are best explained in terms of "Classical Conditioning".
Classical conditioning is a learning procedure that happens when two stimuli are more than once matched: a reaction which is at first inspired by the second boost is in the end evoked by the primary stimuli alone. It is important to know that classical conditioning includes automatic or reflexive responses, and not intentional conduct.