Environment plays a huge role in shaping behavior in all species, including humans. Development and brain function are permanently hindered by growing up in a neglectful, barren environment. See studies on Romanian Orphanages for human examples. Dogs who are born in puppy mills where they are locked in cages all day with no play or interaction with others will behave very differently than dogs born in a home with lots of play, affection, and mental stimulation. These are extreme examples, but it happens in more subtle ways, too.
An Ounce of Prevention
Real-life examples of dogs learning bad habits from their environment. The names have been changed, but the stories are true.
Tammy stayed in a chain-link fence along a busy street when home alone. She entertained herself by chasing the cars down the fence line as they drove by. She was returned to rescue because it was impossible to leash walk her when cars went by. She learned from her environment that chasing cars is fun.
Daisy was great with other dogs until new neighbors moved in with dogs who barked at her through the fence. Daisy would "fence fight" with them daily. Soon, she began to bark and lunge at other dogs when out for a walk.
Jake lived in an apartment. His favorite thing was to sit in a chair and look out the window. He barked at all the dogs who walked by. With daily practice, Jake became difficult to leash walk because his habit when he saw other dogs was to bark at them.
Max was a young puppy in a new home. He was playing in the den by himself when he got the urge to pee. He found a spot on the carpet and relieved himself. It was nice because it didn't splash. Max soon developed a habit of peeing on carpet and didn't want to pee anywhere else, including outside in the grass.
In all of these examples, better management of the environment would have prevented the bad habits. Tammy wouldn't have learned to chase cars if she stayed inside with interesting toys or if there was a visual barrier along the fence. Daisy and Jake wouldn't have learned to bark and lunge at other dogs on a walk if they didn't practice it at home every day. Max wouldn't have learned that carpet makes a great splash-free surface to urinate on if he didn't have unsupervised access to carpet.
It is MUCH easier to prevent a bad habit from starting than to change an established one!
Good or Bad, a Habit is a Habit!
The Brain doesn't know or care if a habit is "good" or "bad". Practice something repeatedly, and neural pathways will form in the brain ("neurons that fire together wire together"). If your dog practices using the bathroom outside in the grass or playing with a jolly ball in the yard instead of chasing cars, those are the habits that form. Then, you won't need to manage the Environment so much. You can leave your dog home alone and trust they won't pee on the carpet or chew your favorite shoes.
Some things will always need to be managed. You can't train a dog to NOT be a dog. Dogs have hard-wired genetic behaviors that are "dog". Some normal dog behaviors are unsavory to humans, like rolling in dead things, killing small animals, and eating cat poop. Normal dog behavior can't be trained away any more than a dog can be taught to have scales instead of fur or to quack instead of bark. It is unrealistic, and arguably unethical, to get a dog with purposefully bred behaviors like herding and guarding and try and train them to NOT do those behaviors. It's something to consider when choosing a dog. If the thought of being gifted with a dead baby rabbit or bird makes you squeamish, a terrier would not be a good choice. Herding breeds will likely herd the children. Shelties and Pomeranians bark loudly and often. Certain behaviors in certain breeds are features, not bugs that need to be "fixed". They can be redirected (ie herd balls instead of children) but not eliminated..
You can't train your dog when you're not with them.
You might be thinking yes, but I want my dog to learn good habits without needing to constantly manage their environment!
Environment Management is not a replacement for training and is temporary in most cases. But, skipping it will make your life harder. There's no getting around the fact that the environment will influence your dog's behavior. You can make it work for you or let it work against you.
The more something is practiced, the more habitual it becomes. Just like the path a dog creates in the grass from running back and forth along the fence, literal "habit" pathways form in the brain from doing something repeatedly.
Training and Management are the one-two punch needed to teach good habits from the start. When you're present, teach your dog what to chew, where to use the bathroom, and to ignore dogs and cars on the other side of the fence. When you're not there, set up the environment so they can't practice the wrong thing and build bad habits. Otherwise, you'll be fighting a losing battle. The path in the grass will never grow over if they run it all day long and you only stop them in the afternoons. The same is true for the neural pathways in their brains.
A Pound of Cure
What if your dog already has bad habits? It will take longer than prevention (a pound vs an ounce), but Environment Management will help break those bad habits!
Bad habits are essentially addictions. We know how powerfully environment influences addiction from Vietnam veterans who became addicted to heroin in Vietnam. Most of them stayed clean when they returned to the US, out of the context in which they used the drug. See "Operation Golden Rush" for more. Rehab facilities exist to get addicts away from the environmental influences to use so they can break the habit.
Another extreme example, yes, but it works for other habits, too. See this study on the habit of eating popcorn when at the movies because that's just what you do when you're at the movies!
If your dog has an established bad habit that you want to break, the first step is changing the environment to prevent the practice of that habit.
Tools for Environment Management include
Padlocks on Gates
Tethers & Leashes
Housetraining is fast and easy. Don't give your dog the chance to use the bathroom in the house. Supervise at ALL times when they are not crated so that you can interrupt and get them outside if they start to go indoors.
Give the dog the appropriate bathroom breaks for their age and individual needs. First thing in the morning, last thing before bed, when you come home from being away, before crating or confining them for long periods, after a play session, and when they signal the need to go.
Go with them outside and praise and reward immediately after the deed. Rewarding them when they come inside rewards them for coming inside, not for "going" outisde.
Pulling on Leash
Use training tools like the Gentle Leader that make it harder for your dog to pull. That is a form of management. Hold the leash close to your body. Refuse to walk forward with a tight leash. Walk in a circle or back and forth and not in a straight line.
Use a baby gate to block access to the kitchen. If your home has an open floor plan where a baby gate won't work, use a crate, x-pen, or tether to keep your dog out of the kitchen. (Never leave a dog tethered without supervision).
Crates are the easiest way to manage chewing because furniture, rugs and carpet, walls and doors can all be chewed. Electrical wires and fringed rugs, among many other things, can be deadly.
Crate or tether your dog or keep them on leash when guests come over. Don't allow greeting until your dog is calm.
Fences (physical, not invisible) and leashes prevent car chasing.
Put your dog in a crate or x-pen or behind a baby gate before opening the door.
Put the trash can in a pantry or locked cabinet where the dog can't reach. Keep the outdoor trash can out of the fence.
Giraffes rarely lay down in the wild. They use their considerable height to spot predators in the distance. In zoos, they lay down more often because there are no predators to worry about there!
Environment really does have a big impact on animal behavior! Cool, huh?