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.
Sorry, but it's painfully obvious you don't know what you're talking about.
Hockey is not a global sport. The further down the ranks you go, the weaker the teams are. And that regression is not linear, it's exponential.
The differences between 20-something ranked teams (Korea/Lithuania/etc.) and the 2nd tier nations like Germany/Belarus/etc. are H-U-G-E. They're enormous. A gap the size of the Grand Canyon. You get the idea.
You have a team comprised solely of elite professional athletes, most of whom are pretty much millionaires on the one hand, while on the other hand you have semi-pro or straight up amateur players, who play hockey alongside their everyday responsibilities and day jobs.
What the Koreans have done is they've bought a few pro players from North America, so that their national team wouldn't be as terrible. It's not going to improve their hockey pyramid and it's not going to expand the game of hockey either.
In fact, the expansion of the game of hockey is being hindered, because nations that would've actually gained from the added exposure (such as, say, Denmark) are not going to be there.
Is there a pro Greek baseball league 10 years after the 2004 Olympics? Nope. The artificial funding (which was there in the first place just so the Greek national team could save face in the Olympics, etc.) got cut, the imports ended their careers and that's how the story ends.