Any dog can learn to stay with it's owner. All dogs enjoy sniffing around but, if trained properly will always keep the owner in site.
I've owned a variety of breeds and teaching them to stay with me off lead was very easy...especially from a puppy. There are some breeds that are referred to as "Horizon" dogs that are harder to train to stay with the owner as they have the drive to run, sight hounds, Northern Breeds and Pyr's can have this tendancy to run. Herding dogs can be hard to teach as they are bred to have intense eye stalk chase motor patterns and chasing objects is a hard wired behavior.
Breeds like Newfoundland dogs have a natural tendancy to stay close to the owner. I havent met one yet that wandered too far, my 2 females are glued to my legs on walks...I never have to use a leash on them.
It's all in the training. I have successfully trained many breeds in my past to stay with me off lead on hikes. I've owned a Border Collie, a few Shepherds, Husky, Husky/Shepherd type, Pyr, 7-Newfoundland dogs probably the most natural at staying with owner, Rottweiler, 2-Dobes; Dobes in the house are almost physically attached to the owner...outdoors they do like to let off steam and have a good run...my current DobeX will sprint away then back several times to let off steam, Standard Poodle - she was a perfect dog, stayed with me at all times etc...of course when the breeder gave her to me she had already earned her CD and CDX obedience titles.