There are a few things going on here.
Jessica's love for Leto.
Despite her training as a Bene Gesserit, Jessica is clearly in love with the Duke, an upright man of impeccable breeding. He wanted a son and she wants to please him. Mohiam accuses her of this outright.
“You thought only of your Duke’s desire for a son,” the old woman snapped. “And his desires don’t figure in this. An Atreides daughter could’ve been wed to a Harkonnen heir and sealed the breach. You’ve hopelessly complicated matters. We may lose both bloodlines now.”
Jessica's place in Leto's court.
As the concubine of Leto, having a daughter would have placed her in a precarious position. The Bene Gesserit aren't above playing politics, but their overriding interest is their breeding programme. By comparison, Jessica is most interested in staying in the good graces of her (in-all-but-name) husband. Had she borne him a sondaughter, there's a possibility that he would have taken a real wife to bear him an heir.
“You may refer to me as ‘my Lady,’ ” Jessica said. “I’m not noble born. I’m the bound concubine of the Duke Leto.”
Again that strange nod, and the woman peered upward at Jessica with a sly questioning, “There’s a wife, then?”
“There is not, nor has there ever been. I am the Duke’s only . . . companion, the mother of his heir-designate.”
To be the mother of God would be a fine thing indeed.
Mohiam accuses Jessica of having a son out of a desire to bear the Kwisatz Haderach. When they're that close to fruition of their breeding plan, there was a real possibility that her son would be the BG messiah. And in fact he was.
“And you in your pride thought you could produce the Kwisatz Haderach!”
Jessica lifted her chin. “I sensed the possibility.”
Note that Jessica doesn't deny that this was something that occurred to her.