Some of the walk is dedicated to potty time and being allowed to explore a little bit. Exploring, framed by structure, will raise your dogs confidence in new situations. Being allowed to roam and sniff excessively encourages prey drive. This distances your dog form you and can lead to behavior issues in time.
When you give your dog guidelines to follow and reward them for following those guidelines, you are boosting their confidence in themselves and ensuring they trust you to get them through anything that can seem scary or dangerous to them.
You’ll notice them looking to you for guidance in other areas they’re unsure of resulting in a calm and responsive dog that will trust you in all situations.