If a behavior produces a consequence of value to a dog or other animal, that behavior will continue and even strengthen. It is so easy to reinforce behaviors in our pets that we don’t want to see without even realizing we are doing it. Sometimes that reinforcement is coming from the environment (such as sensory, tactile or social reinforcement). Always know that if you are dealing with an ongoing behavior issue, something is occurring after it to give that behavior value.

To Have A Better-Behaved Dog, Consider What Happens Between Your Training Sessions
Every waking moment of every day and every interaction your dog has with you and the environment is teaching your dog what works, what matters, and what associations to have.