So what does failure do for your story? What does it accomplish in Thor?
Guess what: everybody fails. Some people fail so much that their lives could be summed up by the word. We all have experienced the pain and shame of failing at something and that pain connects us on a deep, fundamental level with characters who also fail. (That's part of the reason why Mary Sues are so unpopular: they never fail at anything.)
In the movie, Thor starts out as a real jerk. He's proud, insensitive, irresponsible, disobedient... (the list could go on). And yet he's the hero of the piece, so the movie makers have to get the viewers rooting for him. The way they did it was to strip Thor of his god-like powers and send him to Midgard, where he is bested by tasers, hypodermic needles, and political science students.
Making your protagonist fail not only makes your readers root for him, but also helps them step into his shoes and experience the story through his eyes, since failure is common ground for all of us.
What's good about that, you ask?
"I would never write about someone who is not at the end of his rope" -Stanley Elkin
The end of his rope isn't a place anyone wants to go, but everyone has to go there in order to learn some vital truths about himself.
It's generally considered admirable to be what's known as a self-made person. But no one is truly self-made. Everyone relies at least partially on others for his success and for his very existence. Sometimes it takes failure to make us realise just how much we need other peoples' help.
Thor's failure forces him to rely on his friends--both new friends and old ones. When he's no longer able to help himself his friends step in and help him out.
But check out some other great movies. Chances are, failure plays a significant part in those as well. In Megamind the hero fails constantly throughout the movie and his failures teach him a truth that eventually helps him defeat the villain: Bad guys always lose. In It's a Wonderful Life George Bailey's failures teach him a valuable lesson as well: "No one's a failure if he has friends."
Make your characters fail. Make their greatest strengths desert them or even be the very things that screw them up. Then demonstrate that failure isn't what defines them but what refines them and paves the way to success.