Your dog may be pooping inside because something outdoors scares them or makes them anxious. Some dogs have a more nervous personality, and loud sounds such as vehicles passing by, dogs barking, thunder, people shouting, or other loud noises can contribute to fear and anxiety.