The first animals to have anything like an intestine evolved around 548 million years ago. These were roundworms, just a few millimeters long, and they had just a simple tube running from their mouth to their anus – no stomach in the middle.
But already these roundworm guts had tremendously important help in digesting food – inside each roundworm tube lived thousands of bacteria. These bacteria had evolved so that they could only live inside roundworm guts, and they ate some of the food the roundworm caught, but they also helped the roundworm digest the food and get more energy out of it.
Only a few million years later, segmented worms (annelids) had an intestine separate from the crop and the gizzard. The crop stored food, the gizzard ground food up into small pieces – this was because earthworms can’t chew food. The intestine let the ground-up food be absorbed into the other cells of the body.
About the time animals began to live on land, in the time of the first frogs, animals divided their intestines into two parts: the large intestine or colon, and the small intestine. The small intestine digested the easy stuff, and then the remaining food moved much more slowly through the colon, where different kinds of bacteria used different methods – mostly fermentation – to break down foods that were harder to digest. The large intestine also soaked up water, so the water wouldn’t be wasted. Land animals had to be careful with their water.
As humans began to develop bigger brains, they needed to use their energy for their brains and not on digesting their food. They began to eat more meat, which could give you more energy with less work digesting it, and they evolved to have much shorter intestines, with more of it small intestine and less of it colon. Less energy was going to digestion, so more could go to the brain, and you could have a bigger brain.