That dog pooped purely for the pleasure of watching the dude pick it up.
(still via EuropaPress on YouTube)
The town of Brunete, outside Madrid, had a problem: dog owners were gleefully leaving their dogs' poo everywhere, while probably thinking, "Whatever, this isn't even Madrid." Eventually, the town hall contacted advertising agency McCann, looking for a solution to their crappy problem. McCann came up with the idea of tracking poo deserters, finding out enough about their dogs to figure out where they lived, and then hand-delivering their "lost property" to their homes. And of course, they filmed it all (below, in Spanish).
Since the campaign ended, Brunete has seen a 70% decrease in "las cacas" (that's really how it translates!) on the streets, according to people who are going around and tracking canine excrement just so we can quote that statistic. Which also means 70% more dog owners are on their hands and knees picking up their dogs' shit. And that makes everyone happy.