sometimes you don't eat anything for 12 hours and then you're quite hungry at the end of it

sometimes you don't eat anything for 12 hours and then you're quite hungry at the end of it
this happens to me sometimes and then I'm confused why I am angry or easily upset or just making bad choices
I've forgotten to eat for a whole day. Not tried to go hungry or something, and I had plenty of food available. I just... forgot. How does that happen?