If Denmark or Germany is good enough to upset a medal contender, then they should first earn their place by beating teams like Austria and Slovenia to qualify, which they didn't do.
The qualifying process is what it is. Any issues should be taken up with the IIHF. That's no reason to deny the hosts a spot in the tournament.
However many tiers you want to put in between Latvia and Korea, bottom line is neither is a contender. Latvia may play some close games with the contenders, but in the end the result remains the same- the top 7 or so countries will medal. It sounds like you're all for expanding the game of hockey to the lesser nations like Latvia and Denmark, but you want to draw the line after the top 16 or 18 nations. I am also for expanding the game of hockey, but am interested in including nations ranked 19-25. Countries like Hungary/Korea/Japan/Britain/Poland/Ukraine are a lot better than you give them credit for.
I don't see what the big deal is. Korea is the host, and hosts qualify. If Latvia truly deserves to play with the big boys like USA, Russia and Sweden, then just beat out teams like Norway, Denmark and Austria to book your spot, and be one of the top 11 countries in the world.