I've only had one dog that ever did this and I was totally grossed out. Only when he was a very young puppy. He never had much chance of success because I was laid up with a broken leg and when he would squat, I was ready with a paper towel and flushed it. But every so often he sneaked by me. I would say ick, ick in a very exaggerated voice and eventually it sunk in that mama disapproved.
I read up on the possible causes--vitamin B deficiency, especially B12---which could show the onset of malabsorption problems (such as PI). My dog gets a B Complex vitamin daily (the equivalent of about 30-35 mg). I give it to him for another reason, but it might have helped eliminate his interest in stools. At 4 months that behavior stopped. I forgot to say pancreatic enzymes are necessary for the utilization of vitamin B12. Anyway, that's one possible theory. (I guess this is why you suggested pineapple, David)
Another, which I have often pondered, is his intense prey drive, and sharpness. Such an instinctual pup--was it a survival tactic---get rid of any evidence of his scent. I have a friend that owns a border collie with that incredile prey drive--off the charts, actually. The dog has another disgusting habit of rolling around in other dogs feces, and eats his own when not supervised. Survival instinct??? I wonder.