It's intentional, but also a poorly implemented feature.
How exactly are you supposed to cmd+~ on a Danish keyboard? To type a tilde you need to option+¨, then space.
Secondly, switching windows uses a strict ordering, e.g., alt+~ doesn't return you to the previous window (at least that's how I remember it working, can't check it on my Danish keyboard, so how would I know?), but cmd+tab does return you to the previous active application.