The amount of information we encounter from moment to moment vastly exceeds our brains' capacity to process it for all its potential meaning. The brain has to be highly selective in what it pays attention to what it spends precious mental resources trying to make sense of. It therefore uses a filtering process to determine what is and isn't worth focussing on.
Attention is only given to something that might be dangerous or beneficial to us - either because it is new/unexpected or because it is connected to our current priorities. The next step indicates if it is familiar to us or not and what emotions and associations, if any, are automatically triggered. It is the strength of the emotional response that determines whether our brain bothers to actively think about the experience, try to understand its meaning and make a record of it in long term memory. This is why the most effective advertising creates a strong emotional response.