The only time gambling becomes a bad habit is when people don't apply the right psychology, because winning a gamble is sometimes a game of luck and also a game of strategy, so you must understand that this two factors play a key rule in every successful win you get.
However there are some days that luck will run out of you even with your strategy and analytical prowess. So when you learn how to marry your losses and success together in a bid to understand that you are not in charge of the games being played, and that your predictions can go either ways, so regardless of what the result will be, I will take it in good fate, then you will see yourself having a different approach everyday you want to place a bet.
All this doesn't matter in gambling, if you like use the mathematical psychology, you wouldn't win anything if the game doesn't just go as you predicted. I'm not sure about skills in casino games but you see sport games, you Wil do one prediction too simple to win only for the impossible to happen and you can't do anything about it and the reason why this things happen is because you can't control the outcome of gambling even though you are good in prediction and gaming.
It's good to have right psychology but don't be deceived, your aim remains the winning evidence because without that, there is no point in gambling in the first place. Some factors also determine how you gamble, if the house hedge isn't reasonable, there is nothing you will do that will make you win. Sports games has a lot of factors that can make to lose even with the right predictions, all this summerize gambling as luck.