All dogs have a strong sense of smell, when you take them for walks they are "reading their mail" That's what our Vet calls it.
He said that's why they will "mark" areas, they are letting other dogs know they were there. If there's a new dog in town, the others will react, some in fear, and some will keep on walking in hopes of finding their new friend.