You really don't get it. Obviously this is not about "giving thanks for being defeated in a war and having your country destroyed". It's about celebrating the end of a nightmare. Think of it this way: the allies also celebrate VE day, and their countries were also destroyed just the same (except the USA, but you get the point). The Allies obviously are not celebrating the "destruction of their countries", but the end of the war.
The war, the nightmare, the destruction, ended on VE day, for both Germany and the allies. Imagine if Nazi Germany had won, the Germans would be living under such dictatorship. The "thanks" is for allowing Germany the free, prosperous, dignified future it has enjoyed post-war. That was only allowed by the defeat of Nazi Germany. That's what the celebration is all about.
Hats off to the Germans who have had the wisdom and maturity to see the things for what they are and not let themselves being carried away by childish, ignorant and simplistic nationalist views of "us" vs "them". This is much bigger than that. WW2 exposed the idiocy of nationalistic arrogance, something that sadly, is crawling back in some countries (including Germany)...