* It was hot: The most obvious reason a dog would stay in the shade is to avoid getting too hot.
* It was playing hide-and-seek: Maybe the dog was playing a game and chose the shade as a hiding spot.
* It was feeling shy: Some dogs might prefer to stay in the shade if they are feeling timid or shy.
* It was protecting something: Maybe the dog was guarding something valuable in the shade.
Tell me more about the situation, and I can give you a better answer!