As every species is evolving, so does its endocrine system, digestive system as well as brain. As a specie is roaming the landscape and has decided to hunt food and find a place to take refuge, it will populate only the areas to which its body finds sufficient for food and will stay away from predators to be able to secure the population big enough to guarantee a viable reproduction. This way, they can have assurance that their lineage will continue.
As a matter of fact, this space is otherwise called as species “niche”.
As long as animals keep on evolving, their specific preferences on foods are wired to their genes. Still, we have a little healthy variability in every person. The primary mechanism for the preference on a foodstuff falls on:
In addition to that, the behavior and characteristics of other mechanisms around prospective food substance could be read by animals inferring something about its properties as well.
The way how these behaviors are being interpreted along with firsthand taste, sight and smell of the item by the mammal is what helping them to determine whether it is something viable for food or not.