This last week I had a training appointment for a little Keeshond puppy. These are really fun little dogs. Fluffy and sweet tempered, they have been bred to be companion dogs. Unfortunately, this little guy had a bit of a temper. I don't like to say dogs are "mean" or get "angry," but this pup had a lot of built up frustration. You should have seen this poor dad's hands.
Part of our conversation led us to medicating his ears. The family was commenting on how he could easily play with his ears, but as soon as he went to put ointment down there, this puppy was all teeth. The family didn't understand how he could be fine in one situation and not another.
Dogs are really contextual. They take into account all those little things in order to decide how they should act. Another term I like to use is "compartmentalize." This behavior lives in this little box, this behavior lives in this box, etc. As far as the dog is concerned, everything makes sense. It's really tough for humans, as our higher logic, rational selves, to understand why a dog might be okay in one situation and not another. As far as this puppy is concerned, it's not the same thing. There is ointment involved and the ear is held in a different way an the owner probably approaches him differently. Believe me, they know the difference.
Dr. Pike had a similar issue with her dog, Ike. This week was their first agility class up at WOOFS. Apparently the first 10 minutes he was jumping around, mouthing, and ignoring treats. As soon as they brought his settle mat into class though, he dramatically shifted gears. He was being contextual. It's not "work" time unless his mat is there. See, even we fall into that trap sometimes.