Your brain is active throughout the food cycle. It transmits most information such as "I'm hungry", "I'm going to stop eating", "it's good", etc. On the digestion front, it receives and transmits hormonal or nervous signals by means of the "vagus nerve" which connects the brain to the digestive tube.
When you taste a new food, your brain is immediately notified. All your senses update your brain on this newcomer's organoleptic (taste, odour, appearance, consistency, etc.) qualities. Your brain then runs an analysis before storing the information carefully in its food directory. This way your taste memory can be added to endlessly!