system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do we have the feeling of not wanting to eat when we are sick, even if we are hungry?
gpt
The endocrine system is basically the logistics hub of the body.  It will divert resources to where they're needed as they're needed.

The body uses the circulatory system to help fight off infections by redirecting antibodies to where they're needed.  Like how first responders use the highway system.  When you're sick the body draws off blood to the affected area so the antibodies in the blood can fight the infecting pathogen

When you eat, blood is drawn off to the vessels around the stomach in order to pick up and transport sugar and other nutrients, and that jams up the highway through which antibodies reach the affected area, reducing the effectiveness of your immune response.

The endocrine system prevents you from feeling hunger/eating in order to keep the freeway clear for emergency vehicles instead of clogging it up with food and mineral transporters.  It's pretty much exactly that simple.

This is also the reason we feel sleepy after a big meal, and when we feel sick -- the blood supply that normally feeds the brain is otherwise engaged.  The body's changing priority levels favor the brain once basic needs like immune response or nutrition are met but will draw off resources to deal with more imminent problems.

This is also why people are given light food when fighting an illness.  They need the fuel for body power but want to keep traffic disruptions to the combat zone to a minimum.