If people surprise you by their actions it’s because you lack information. People act according to their motivation as influenced by their environment. Once you understand the person and how they view their current environment predictability falls into place.
When someone shows you who they really are…believe them. We do so much acting for others (and to convince ourselves) that actual moments of selfhood are sandwiched between expressions of non-self. Look for moments of motivation and you’ll find the real person behind those motives.