Well, people sometimes learned from their mistakes and realized they wrong. Perhaps at that time you feel greedy and want to gain more in gambling. Because actually gambling is not for making money but the interpretation of most gamblers is making money, not for the fun activity. Indeed, in this post, --you already had found the answer. Gambling of what you can afford to lose is the first rule to implement to your self because that is only self-discipline.
Be careful of this attitude that you can't sleep as a gambler because you are chasing your losses. Perhaps, this is the reason why you become addicted to gambling without knowing your self because all you know is a habit.