The answer is that, since neither you nor your opponent (nor anyone else, including the best computers in the world) can calculate infinitely deeply and accurately, we can sometimes play moves that are not strictly the best, but which give us a better chance to win or draw than by playing the "correct" move.
Now, you should never try this sort of thing when you have a good position. In fact, it's usually a bad idea even when the game is balanced. But when you're losing, all bets are off! When we're losing badly, the theoretically best moves will still leave us in a losing position. The best thing we can do to improve our chances of getting a result from the game is to make the game complex, giving our opponent a chance to make mistakes and allow us back into the game.
For instance, down a couple pawns, you may have to choose between giving up a third pawn but gaining the initiative, or trading off most of the pieces and heading into a simplified endgame -- still losing by two pawns. A computer may very well tell you that trading is the best option, since it keeps the material balance as close as possible. However, against any competent opponent, this will almost certainly result in a loss! Instead, allowing your opponent to take the extra pawn may allow you to launch an attack. It may or may not be successful, but at least it gives you a chance.
That example may not be directly analogous to a bluff in poker, so let's try another one that's closer. Once again, pretend you are losing a game, and that allowing the game to continue on its current path will certainly result in a loss. You see a promising tactic that could allow you to gain the advantage, but after several minutes of analysis, you realize that your opponent has a refutation. All the safe lines lead to much quieter positions. What should you do?
Again, the correct answer is usually to go for the tactical line, even if you know that with best play, it will be refuted. It's much better to give yourself a shot at climbing back into the game, even if it could mean a quick loss, rather than assuring yourself of a much slower defeat. Of course, if the tactical refutation is too obvious, then you shouldn't go for it; but if it took you a long time to find, there's always the chance that your opponent may miss it completely.
For the most part, chess isn't a game of tricks; if you're winning, or in a decent position, you should play the best move possible, not the trickiest one you can find. But when you're losing, it's time to pull out all the stops: and that can include bluffing by confidently playing a move that's actually not that good at all.

