Not only that, but that's how dog pass parasites to each other. The local dog parks here (which I keep my dog from)) have parasite issues once in a while because people are too lazy/inconsiderate to pick up after themselves.
It's worth considering the environmental impact of spending a whole plastic bag (even if small) for what often amounts to rabbit-sized poop in case you have a smaller dog. I'm one of those owners that make contextual judgements about when to pick up and when to leave it or flick it into a nearby bush with a stick. I'm not picking up poop off-trail in the forest. Also generally not alongside car roads (talk about pollution).
I know owning pets is not environmentally sound, so all I can do is mitigate.