"Thank you very much" is a quite formal way to say "thanks" to someone. Because it's so formal, people sometimes use it as a joke in situations that don't really need to be so formal.
In the example at top, the speaker doesn't need to be super-formal to a stranger who opened the door. But since he did something very polite by opening the door for her, she responds with the formal and polite phrase to thank him.
A more common response if someone opens a door for you is just: