As an unsavoury yet green side note, I got the impression they tied into the NX-01's waste treatment system.
Heck, nature works the same way. What do you think fertilizer's made of? And on a closed system like a starship, waste has to be recycled as completely as possible. That's undoubtedly true on starships of any century. (Hmm, makes me wonder if 24th-century toilets dematerialize instead of flushing...)