Consider a person who bets in such a way that he stands to gain money when his favorite team loses. He unwittingly does this thinking he will be happy irrespective of the result. After a while, he realizes he doesn’t care about losing money as long as his team wins, and he feels happy for that. However, what he fails to foresee is his subconscious associating earning money with misery.
What happens at the end? The poor guy quits his job, and his family him.