Dogs are not born knowing where to do their "business" or how to sit or walk on a leash. They have to be taught, just like children. Shelter, adopted or puppy mill dogs may come to us older and with many issues, including needing to be trained or retrained. Many times we cannot know the past of our dogs or the amount (if any) of the training they received. Sometimes we even need to start from scratch with an older dog who we assume already knows how to be a dog. Sometimes they don't.
The first few days are very important when we bring home an older adopted dog. In that time, we have to realize that they don't know our rules or our wants but we also have to teach them all these things. From where they are to sleep, or poop or our routines, everything has to be shown to them. Shelter dogs are ofter afraid and yelling at them or "pushing their nose in it" will often set them back and make it even longer that it takes them to come around and know your rules and routines.
If we remember these things and teach everything in the first few days using reason and patience, these dogs will learn and trust faster. The only thing a dog wants is to be loved. Kindness will train a dog faster than punishment will. Behavior training that employs pain and punishment will only breed resentment and fear. I highly recommend Tamar Gellar's, "The Loved Dog." It really helped me understand how dogs think and how to reason with them and help them understand what their "job" is. Every dog owner should have this book on their bookshelf.