"learning to lose" and "learning to accept failure" and all that are very important, and something that, as has been noted a million times in media, is something children aren't being taught enough anymore. Games are a fairly good medium to teach them how and why - sometimes it's bad luck, sometimes it's bad decisions, sometimes, well, it just happens. It's not fun, and you should probably try to win, but even if hope of winning is lost, you still have to keep playing and keep the game fun, both for yourself (set another goal than "winning", if need be) and for others; it's unfair to spoil someone else's fun.
When my brother was a "bad loser", my parents solved it by responding by being a bad loser when he was winning - ending the game before he won, complaining, etc. Not a tactic I'd suggest, honestly, but it did help him understand that complaining really makes it less fun for whoever's winning.