It can feel like food is racing straight through your body when you need to poop soon after a meal. But that usually is not what is happening. In most cases, the bowel movement is made from waste that has already been moving through your digestive system from earlier meals, not the food you just finished eating. (Cleveland Clinic)
The reason is something called the gastrocolic reflex. When food enters your stomach, your body sends signals to the colon to start moving what is already there. That movement can create the urge to have a bowel movement shortly after eating, even though the new meal has only just begun digestion. (Cleveland Clinic)
Digestion itself takes much longer than a few minutes. On average, food spends about six hours moving through the stomach and small intestine before entering the large intestine. After that, waste can take roughly 36 to 48 more hours moving through the colon before it leaves the body as stool. (Mayo Clinic)
That is why pooping right after eating does not usually mean lunch instantly became stool. It more often means the new meal triggered your digestive tract to push out material from a previous meal that has already been in your system for many hours, often at least 12 to 24 hours and commonly longer. (Cleveland Clinic)
In other words, the timing can be misleading. Eating may trigger the urge, but the stool itself is typically old waste already nearing the end of its journey. (Cleveland Clinic)