A careful examination of the text shows readers that Patrick or Mary never says the word "divorce." We can't be 100% sure that Patrick wants a divorce:
"This is going to be a bit of a shock to you, I’m afraid," he said. "But I’ve thought about it a good deal and I’ve decided the only thing to do is tell you right away. I hope you won’t blame me too much."
And he told her. It didn’t take long, four or five minutes at most, and she sat very still through it all, watching him with a kind of dazed horror as he went further and further away from her with each word.
"So there it is," he added. "And I know it’s kind of a bad time to be telling you, but there simply wasn’t any other way. Of course I’ll give you money and see you’re looked after. But there needn’t really be any fuss. I hope not anyway. It wouldn’t be very good for my job."
It is conceivably possible that he wants to separate from Mary and live separate lives but not tell anybody and not have a legal document attached to his name that says he is divorced. This arrangement could be why he says the line about "it" not being good for his job. Perhaps a divorce would reflect badly on him and his work situation.
Regardless of what Patrick wants, it is clear that the marriage is over. Unfortunately, readers never learn what Patrick's motive is. That's okay because it's not the point of the story. Mary's transformation from hearing his terrible announcement is way more important to the story. Additionally, Dahl has created an interesting discussion topic by not telling readers why Patrick does what he does. Perhaps he has found another woman. Perhaps the thought of being a father is too much for him to handle. Perhaps Mary is too much the doting wife, and he feels stifled at home.