From an evolutionary perspective, the concept demonstrated in the scenario of spitting out spoiled milk or rancid cheese before cognitive awareness is the adaptive advantage of disgust.
Disgust is an evolved emotion that serves as a protective mechanism against potentially harmful or contaminated substances. In the context of spoiled food, the immediate aversion to the taste or smell helps prevent the ingestion of potentially harmful bacteria or toxins.
This rapid, pre-cognitive response is advantageous as it allows for quick rejection of substances that might pose a threat to an individual's health, providing an evolutionary advantage by reducing the risk of consuming harmful or spoiled food and promoting survival. Disgust, in this sense, acts as a swift and automatic defense mechanism to protect against potential dangers in the environment.