Dogs run away for many reasons, including boredom, fear and loneliness. Dogs that have not been spayed or neutered often run away to find a mate, and some dogs run away when they see something to chase.
The most common cause of running away is boredom. Figuring out how to escape from a securely fenced area is fun and interesting. Once the dog is outside of the yard, interesting sights and smells continue to draw it farther away from home. If someone attempts to catch the dog, the dog may perceive that as a fun game of chase and keep running. Dogs that do not get enough attention and social interaction run away to find companionship from new humans or dogs.
Dogs may also run away out of fear. This is common during fireworks celebrations or thunderstorms as the dog seeks to escape the noise, but any frightening thing can cause it. Some dogs suffer from separation anxiety, which means they become unusually frightened when left alone.
Most dogs have the instinct to chase fast-moving prey. Dogs that are left outside without a containing fence may run off after other animals and have trouble finding their way back. Sometimes dogs run through electric fences and then cannot get back inside when they calm down.
Male dogs that have not been neutered are especially likely to roam in an attempt to find a mate.