Long ago, in situations of depletion of resources and climate change, our ancestors — protohominides — learned to experience natural products of the environment for food. Modern primates (like baboons) still do that. They approach the unusual or unprecedented food source carefully, carefully study its appearance and smell, then put it in the mouth for the sample and hold it in the mouth without swallowing. After a few moments, the animal decides to either swallow the piece or spit it out. For many centuries, this procedure was repeated by man countless times during the establishment of his diet.
Obviously, it was necessary to come to a certain balance between the exclusion of food, which is deliberately unhealthy and reduces the reproductive capacity of the individual, and the inclusion of as many food sources as possible. The logic of evolution is adamant, and in situations of lack of food, those animals that are able and willing to accept more food options evolve more successfully than those that are able to include in their diet only a limited menu. In other words, this or that animal will be pressured to expand the range of usable food, expanding its tastes.