Even better is when the character can surprise themselves and achieve more than they ever thought they would. There is a negative side of course - that is when they prove themselves to be, say, more cowardly than they thought they would be.
But every character must have a positive and negative side if there is to be any hope of producing characters that are realistic. Even fantasy characters have to have some element readers can identify with or where they can see why the character acted the way they did.
The other act of surprise for the writer is when the story takes off in unexpected ways. I love this. It gives me a real buzz. I outline stories so add the new idea into my outline so I can see what is better - what I originally had or the new idea. Often it is the latter and I happily write it up, knowing I'm not going off at a tangent.
So surprises can be a good thing for writing. Now back to my short stories... I wonder what surprise(s) they'll have in store for me. The great thing is it is always fun to find out!