At first, I could sense from what you have said that there must have been some conditions that his spouse gave him while they were possibly dating, which might be related to such, and possibly from that condition, he has refused to open up to her about his gambling lifestyle, which is very wrong. In a relationship, communication is very important because on it lies the strength of every successful relationship, and allowing your spouse to find out about that hidden secret or lifestyle discredits you before them, regardless of whatever you both have had in the past.
Trust is built in a relationship when there is nothing hidden beneath, although he must have had his reasons why he kept it a secret, but it should not have taken him this long to have allowed her to find out herself, which isn't alright and for that reasons I believe she walked out of the marriage just like that reasons being that if he had kept his gambling lifestyle a secret from her that means there are others she has no knowledge about and for that reason he can not be trusted and the best thing for her to do is to take to her hills which she already did and if you ask any lady, that's the step or resolution they would take to run away for their dare life.