In general it's a very bad idea. The weaker your opponent and the more desperate the time trouble the better this idea is. Although... if your opponent is so weak it's a much higher odds play to simply play the best move you can find every time.
Playing wrong moves against bad player in hopes of mistake a valid strategy?
Very bad idea. Don't EVER underestimate your opponent.
There is a saying that the easiest way to add 100-200 pts to your playing strength is to not to know your opponents rating.

Is like trying for 2 points in an (American) football game, instead of taking the easy exrta point.
It is a valid strategy only when it works. When it doesn't, you're just a bum.

Well said Tapani... a bad move is a bad move regardless of who you're playing.
Granted, a weaker opponent may not see how to take full advantage of your mistake but, to me, "hoping" your opponent will do something is second rate to forcing the issue with good and accurate play. I'd drop this bad habbit if I were you.

It can be worth traying when you're lost no matter what move you play.
The "wrong" move with counterplay potential can lead to a much faster way to lose but also to some unexpected resurrections to a draw (perpetual I love you) or a victory (backrank anyone?), especially when you have a strong feeling that your opponent is a little bit too focused on finding the winning maneuver around your King, so that s/he might lose sight of what's happening around his/her own monarch (a situation which is more likely to happen when you're playing a not-too-strong opponent).
This is just hope-chess, you would have lost quite easily if he had seen it.
Do not play such moves unless you want to lose...

I´m thinking now like in those attack against a castled king, when the defending side makes h3, sometimes you make Bxh3 and exchange the bishop for two pawns, but you know that the attack is not sound, anyway, if it´s a 3 min game, it could be something reasonable to do, since to defend is more difficult than to attack, so the defending side is going to use more time.

I think this kind of attitude can only be harmful to your game. Even though you won, you took a big gamble and should have lost to a weaker opponent. Even with tight time-controls, a reasonable player should never make such a silly move.
Calling someone below you a bad player sounds pretty arrogant, in the game this arrogance is apparent, and it makes you play worse.

Yesterday in a game I had something where it was like that:
My Knight was the only piece between the two Queens, my Queen was covered, his wasn't.
He attacked the Knight. I had several options. But I saw his hanging Queen and thought: The worst that can happen is that I have to make a backwards move to recapture if he takes the queen. So I exchanged my Knight for one of his.
He retook the Knight. I took his Queen. He surrendered.
So while I probably could have ended up in a very slightly worse position, it was a risk I was willing to take for the chance to instantly win the Queen and thus the game.

Playing moves you know to be bad against a bad player is great, if you want to lose to a bad player.
Playing moves that you know to be double-edged or uncomfortable for you does make sense though. Against someone who rates more than 200 points lower than you, try a different style. play more aggressively, try a new opening.
But don't play moves you know to be bad.
And even if you win with such horrible moves, you won't develop as a chess player. Therefore you will lose to player's who are about at your level or above.

Playing moves you know to be bad against a bad player is great, if you want to lose to a bad player.
Playing moves that you know to be double-edged or uncomfortable for you does make sense though. Against someone who rates more than 200 points lower than you, try a different style. play more aggressively, try a new opening.
But don't play moves you know to be bad.
This.

No, you don't want to form bad habits. Play your best at all times, and then you won't NEED to rely on another's mistakes for you to win.
Sometimes you can get away with playing inferior moves against a weak opponent, but this was a really, REALLY bad example.
Even a beginner could have captured with the king even without seeing your trick, because there were only two legal moves and there is no reason to believe they wouldn't pick the king capture just by pure chance. It was basically 50-50, and you were lucky to get away with it. Why gamble on a 50-50 chance against a weak player, when you have better odds of beating them just by playing normally?
Jump to the end of the game. I decide to go for a smother which should've failed, but I did it anyway since I played my opponent enough to think he wouldn't see the mistake.
Does anyone do the same thing when playing lesser players? I find myself a lot of times making haphazard moves (especially when I don't feel like calculating and there is time pressure on both of us). I make "wrong moves" on purpose in hopes that the opponent wouldn't see it, and I'd capitalize and exploit the advantage I got.