Some pups do it and then the taste for it seems to just fade as they grow older. But some do continue the habit into adulthood and to eating other dogs, horses and foxes poo too whilst out and about. I have one dog, that will, given the opportunity do just that, he has to wear a muzzle whilst out to prevent him - but at the same time give him the freedom to have the exercise he needs
There have been very many theories as to why they do it and how to cure it, but I think as bizzylizzy says stopping it b4 it becomes a potential long-term habit is probably the best way to go...I wish you luck
If you are going to feed him pineapple I would worry about the acid in the pineapple on his stomach at such a young age, but then again would that be any worse than his poo.