I can only apologise on behalf of other dog owners. Our male dog, a rescue, is always on a lead when we go out along roads and I never let him wander into peoples gardens or onto their drives. He pees and poos where he should, it’s not been difficult to train him. He loves being in the park, running, playing, etc, and we follow the park guidelines about short leads in certain areas, etc.
Some dog owners are inconsiderate about their dogs, and also just dump pooh bags in odd places!
All that is needed is some consideration and thinking how others might feel in any given situation ?