Is this a large dog? Maybe he thinks he's a horse or a cow, they poop as they walk. Was he raised around large farm animals? If he has seen other animals doing this he may have picked this up through observation. Alot of dogs (and cats) learn by watching. Has he always done this or is he an older dog that has just started this practice. If he has hip dysplasia or arthritic joints it could be hard for him to assume the normal stance and he prefers to be upright when he goes. And walking tends to stimulate the muscles, so maybe it's easier for him this way. Or maybe he's just to lazy to stop and squat, or maybe he likes to multi-task, this way he can do two things at one time.