Characters that are well written are extremely complex, just as people in real life are. And just like people, characters will be slightly different depending on the situation in which they are placed.
For example, if a character is serious while inside a church, we might perceive this character as thoughtful, respectful, traditional or religious. However, if the character is in a party, we might perceive the same behaviour as something that a shy or awkward person would do. Although the character has not changed, the variety of setting can make us perceive them differently.