For me, some of the wanting to eat a particular food or food group is a reaction due to needing nutrients I haven't eaten recently. As others, I must care for sleep, rest, light, exercise, and those things in my life which help well-being.
If I eat meat, fat, and a few nutrient-rich carbs, and keep my water intake high enough, that covers a lot.
I also need lots of minerals. If my intake is too low on salt, seaweed, bone broths, I will get the urge to eat carbs or low-nutrient foodstuffs.
If I have eaten something which I get allergic reactions to, those reactions will trigger "eat this" or "eat that".
Dr. Theron Randolph wrote about these stages of reaction.
Here is a short synopsis of "The Addiction Pyramid":
As people gradually become increasingly susceptible and cumulatively exposed to commonly consumed foods, food-drug combinations, and drugs, to which they are reacting unknowingly, they tend to ascend the addiction pyramid.
More info on the stages of reactions:
Also, other things in the environment can trigger appetites for food or stimulants. These are known as exogenous endocrine disruptors.
Dr. Samuel Milhelm's studies on "dirty electricity", Dr. Magda Havas' work on the effects of EMFs are useful reading.
Here is a page at the National Institute of Environmental Health Sciences on endocrine disruptors. BPA is one.
My two cents.