If, just before you die, you eat food but don't finish eating, then you can still finish the food after you die.
To reproduce:
Choose a way to die. For example falling. Just before you hit the ground, hold right click to eat and hold it down even after you die. You finish your food after you die, and when you respawn,
you have one less bit of food.
Hi! This appears to be a duplicate of MC-133218.