E.g. woman buys new shoes on pure impulse. At home she finds they go really well with a certain purple dress. Why that's precisely why she got them, of course. Eight months later, that's all she remembers: I had that dress in mind when I saw those shoes.
(There's at least one study on people with severed brain stems that is fascinating in this respect, but I can't remember where I read about it, and don't have time to track it down)