^
I think it's not just about religion or discipline, it's about realizing that the probability of winning a large sum of money in gambling is very small and one should not tempt fate by trying to win a big prize again. I think this man asked Allah to help him find money to save his wife. He succeeded. He came to gambling not because he wanted to get rich, but because he was in need, so it makes no sense for him to go back to gambling. He got what he wanted and I am sure that he is immensely grateful to Allah and now lives a happy life.