Scientists say they have uncovered how and why wombats produce cube-shaped poo -- the only known species to do so.