When it's used this way "thank you very much" is an idiom. No one is being thanked. The speaker is expressing mild offense or indignation that he had to say or explain something that should be obvious to anyone.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.