Found the relevant info
It's not actually poo that the guinea pigs are eating. However, it looks like poo and comes out of the same place. And it's actually vital to your guinea pig's health and well being. Truth is definitely stranger than fiction.
Name That Pellet
Guinea pigs excrete two kinds of dark brown pellets. One is the poo we all know and expect - the other is a compound of vitamins and proteins that help the guinea pig digest B vitamins. These are called ceacotrophs. They are very similar to the cud that hoofed animals like cows, deer and giraffes produce. They can't chew their food enough in order to properly digest it - so in cud's case, it settles in the rumen to be worked on by acids, then shot back up the esophagus for another chew. Now, it can be digested. In a guinea pig's case, they don't have rumens, so the "cud" comes out the other way for a second chew.
Caecotrophs are squishier and smellier than their poop counterparts. You will very rarely ever see them. If you do see them, that's usually not a good sign. Guinea pigs usually ingest them as soon as they know it's about to pop out. If you've ever seen your guinea pig chewing after cleaning his or her behind, you no know what he or she is chewing on. If your guinea pig does not eat these, they will become malnourished very quickly.
This as you have stated goes for rabbits too