If you're coming from North America I might add that you are legally entitled to 5 weeks of paid vacation a year. Many people get 6. That doesn't include public holidays (~11 pa). New parents have some of the best treatment in the world, you're paid to study, homelessness and crime are ridiculously low, it has one of the world's best infrastructure for cycling, etc.
There's a joke Danes make that you know you're becoming Danish when you enjoy paying your taxes. With such a well run society you can certainly see why.
I can't imagine a comfortable middle-class life in Berlin on half of what I make.
And €40k is already not exactly living it large in a city with much lower costs of living, I can't imagine how it would be beyond working-poor for somewhere like Copenhagen. Let alone the much lower amount that the average person in Copenhagen would earn.