Most of what human brain does is prediction of what comes next. For example, as you're reading each word in this sentence, your brain is trying to predict the next word you might see (a word or a phrase or even a whole sentence that's likely to come next). When you don't see what you expected you get surprised.