A wombat deposits dozens of roughly two-centimetre cubes in a night, often stacked on rocks and logs where the scent carries. Researchers who dissected wombat intestines found that the last portion is not uniform: two narrow stripes of the wall are markedly stiffer and thicker than the rest, so as the drying faecal mass is squeezed along, the soft regions bulge and the stiff regions hold, folding the cross-section into a rough square.
The long, slow gut helps. Wombat digestion can take on the order of two weeks, and by the time material reaches the terminal intestine it is very dry, which lets the edges hold their shape instead of slumping back to a cylinder.
The explanation that the wombat has a square anus is wrong; the sphincter is ordinary and round. It is also unclear how much the cubic shape matters to the animal. The stacking behaviour is real, and cubes resist rolling off a raised marker, but that advantage has been argued rather than demonstrated.

