This is mainly down to your dog's natural instinct. As a puppy your dog would have followed his littermates around. As your dog's ‘pack leader’ it is your job to keep your dog safe and provide food. Your dog knows this and so sticks with you as he knows that is what's best for him and this is what your dog's ancestors would have done in the wild.

A young girl taking her obedient dog on a walk in the wood
A study done by scientists has found that dogs can show attachment to humans. So your dog is seeking you out for safety and because he loves you.