The only time I can ever see it being used is in a last ditch act of desperation. But you'd probably do just as well to throw a chunk of concrete or a fist full of sand at the guy. Little reality check here, I've been throwing knives for three years, every day, twenty minutes a day; I still don't hit the target every time, and I don't stick every time I hit it. It's hard to stick a knife properly and accurately from a known distance, at a log. Two steps in the wrong direction or your hand in the wrong place on the handle means that you get that unpleasant "Clang!" of the knife as it comes flying back at you causing you to run for cover like a little girl from a bee (remember back to your first week of throwing, you know what I'm talking about). As of right now I've only killed three things with my knives 1 moth, 1 beetle, and 1 potted plant. All were accidental.
Let's go with the sentry idea first, even though the situation seems a bit video gamey to me. So you need to take out this guy quietly. So what happens if you don't kill the guy with the throw. Puncture wounds and stab wounds hurt, I know from experience anyone whose ever stepped on a nail or slipped with a pair of scissors can tell you that. Say you don't hit him somewhere immediately vital, he may very well eventually die but chances are, he's not going to grunt and fall over like in the movies, he'll probably be running around cussing and screaming like a stuck pig, then what? "Shhhhh quiet!" Or even worse, you miss altogether or bounce, he might end up with a lump on the noggin but he's probably not going to die from it, so then what? "Oops, turn around and let me try that again." Unless time travel technology has been invented, maybe the government has it, I don't know for sure; but, you probably can't just load a save game and try again in real life. Now everyone knows you're there and you couldn't do your job. I doubt anyone in a position where they might find themselves in this type of situation would consider chucking a knife through someone's skull an option; if they would, well, that just terrifies me considerably.
Now lets look at something else, say you're in a fight and something goes horribly wrong with your gun. But aha! You know how to throw your knife. Let's forget for a moment that statistically, most people will never find themselves in a combat situation, and that of that small percent that do, only a small percent will ever be close enough to the enemy in a situation to consider knife throwing an option. But we'll say you're a part of that tiny little percent and it happens. So your first thought, upon your gun going "kaboom" is not to take cover and try to fix it, or to retreat, but to jump out in the open, bad guys still shooting at you, and wail your knife at your attacker. Now I've never been shot, but it looks quite painful and it would not be my first instinct to jump out in front of whizzing bullets in a, quite probably, futile attempt to kill one bad guy. But let's say you do, and you miss, "oh well," you're probably no worse off than you were a minute ago provided that you're immune to bullets but you didn't really do any good either. But let's say you hit him, and you're immune to bullets and he dies; so what, there's still bad guys shooting at you, you still have no gun, and now unless you're a Jedi or Rambo and your knife can boomerang back to you, you can't do it again so you either have to retreat or fix your gun, which is what you should have done in the first place. So what, exactly, was the point? I find it highly doubtful that anyone would find this option very appealing in real life and it seems like a good way to get dead. Plus, where were all your friends when your gun jammed and you did your Conan thing?
So now let's look at something completely different. Say you're totally screwed, the bad guy kicked your gun out of your hands and it slid WAY across the room, now he's coming at you with a bayonet. "Oh noes!" you think, so out of desperation, you throw your knife at the bad guy and you miss, and he bayonets you through the lungs, and you die, oh well, you had to do something and it didn't work, you were dead anyway so what the heck. But lets say it hits him and bounces of his head, either the above scenario happens anyway or you knock him off balance for a second and hopefully you have enough common sense and time to cheese it before he comes after you again. So let's say you get really, really lucky and he goes nighty night forever, then you're free to do whatever, go all John McClane on the rest of the bad guys or whatever it is that you want to do. The point is, this is the only scenario where I see it as very likely that anyone would try to throw a knife at a bad guy and even then, it's pretty unlikely that it would do any good, and even then it's likely that such a feat could have been accomplished just as well with a rock. Even forgetting that it's pretty unlikely that you'll ever find yourself in this situation.
Honestly, I think that this fascination with combat throwing knives comes from non-stop action packed Hollywood thrill rides of violence and mayhem where consequence is practically nonexistent. They're fun to watch but they're just that, fun. Always remember that movies are fake, they're for fun and not to be taken too seriously. Can throwing a knife be done in combat? I'm sure it has been done, and I'm sure it could be done again, provided that you find yourself in a situation that's about as likely to happen as getting eaten by a tiger shark in a back yard swimming pool but honestly, it's a very impractical and, frankly, stupid thing to try if you have any, and I mean any, other option.