Gamblers who can win multiple times or large sums of money will become greedy because they will see that the opportunity to get more money has come and will have to use it to win again. But some gamblers can control themselves and know that their time has come to a stop and they obey it because they know that victory is not always on their side. As long as they can control their emotions, they will be able to master gambling and will not become greedy because they know that gambling is entertainment that can cause two things: winning and losing.
There is a huge chance for a gambler on a winning streak to get greedy but if he is disciplined enough and keeps on the planned activity, he can avoid being greedy. Though I agree that most of the time gamblers that has no dedicated plan for gambling often got hooked on the winnings and get greedy until they lost everything. But OP's story is different, the person in the story managed to stop and get away with the winning with motivation in hand which solves the problem of his company later.