Different reasons. Could be hormonal, eating disorders, blood sugar/insulin sensitivity issues, food cravings due to nutritional deficiencies or food allergies (You can crave foods that you’re allergic to), etc. From a neurocognitve perspective, people who have suffered repeated psychological traumas and therefore have an unstable sense of identity and /or dissociative experiences will sometimes eat just to be ground themselves and ‘come back into their bodies’ by feeling the heaviness of the food in their stomach and therefore attenuate the dissociative experience, much like other people use cutting to achieve the same end. I’ve done it myself...with the food. It’s sad.