In the famous experiment, Pavlov's dogs reacted to clues that they were soon to be fed by drooling without ever having seen food. The stimulus was either a ringing bell or seeing the experimenters white lab coats. The same phenomena holds true when you pick up a leash (oh goody a walk, a walk, a walk, we're going for a walk), open a can (they're going to feed me that yummy mushy food now, oh boy), or open the pantry cabinet that stores the dog food (yippee, it's supper time!).
My Barney, who I've longed claimed was one smart dog, recognized the good and bad meaning of suitcases. When suitcases appeared by the door, it meant one of two things. 1) Road Trip!! or 2) Desertion. Sometimes he got to go with. Sometimes he got to stay home with a partial stranger who was nice enough but not the same as his human family.
He was also smart enough to try and tip the scales in his favor of the suitcases indicating meaning #1. He would try to get into the car along with the suitcases. If he made it into the car, it was a good sign. If we resisted him, you could detect his sadness as he realized we were off somewhere without him. If strategy failed, he resorted to whining and wimpering. Sadly, that still didn't get him a seat on a plane to a tropical vacation.
Fortunately, all was forgiven when we came home. Unlike my cat growing up who would punish us by ignoring us for hours after the return from a trip, Barney greeted us with glee. Jumping, licking, and doggy kisses.