Former Virginia Gov. Bob McDonnell leaves the federal courthouse in Richmond, Va., with his lawyer John L. Brownlee on the second day of his and his wife Maureen's corruption trial, Tuesday, July 29, 2014. (Alexa Welch Edlund/AP)

There is a prominent flaw in the legal strategy of Bob McDonnell: Even if the disgraced former Virginia governor wins in court, he loses.

In December, during McDonnell’s final days in office, prosecutors offered him a deal that would have let his wife off the hook and would have required him to plead guilty only to a single charge unrelated to his official duties. But McDonnell chose to go to court.

And so Maureen and Bob McDonnell found themselves seated apart but at the same defense table Monday with his-and-hers teams of attorneys. They listened to the final day of testimony by Jonnie Williams, the slick salesman who allegedly lavished more than $150,000 in gifts and loans on the governor and his family while receiving favorable treatment for his nutrition-supplement business.

Had he taken the deal, McDonnell would have looked like a sleazy pol. Now, he looks like a sleazy pol and a cad. Even if the former GOP governor beats the 13 counts, the trial is showing him to be not just greedy but also ungallant, allowing his wife and children to suffer to minimize his own shame.

McDonnell’s decision not to make a plea bargain meant that one of his daughters had to testify tearfully last week about improper gifts from Williams and others that financed her wedding, and that the world now knows about the e-mail message the governor’s wife sent Williams after the 2011 earthquake: “I just felt the earth move and I wasn’t having sex!!!!”

The McDonnells’ defense is that Maureen had a “crush” on Williams and therefore hid from her husband her crush’s largesse. Problem is, much of that largesse — a Rolex, use of a Ferrari — was for the governor. And the object of Maureen McDonnell’s affection claims to have known nothing about her ardor.

“Did you have any idea my client’s marriage was complicated?” a defense attorney asked Williams on Monday.

“No idea,” replied the witness, testifying under an immunity deal.

Asked whether he had a romantic relationship with Maureen McDonnell, the former salesman looked amused.

“I didn’t know Mrs. McDonnell had any interest in me until last week,” said Williams, who is married, 59 years old and about 5-foot-6. Testifying in a shiny and rumpled suit, he was not an obvious object of desire.

He seemed to like hearing himself talk — so much so that Judge James Spencer at one point had to break in: “Mr. Williams, there is no question before you.”

The McDonnells’ attorneys went to great lengths to imply a relationship between the former first lady and the big-spending executive. It fell to prosecutors to defend Maureen McDonnell’s honor. They pointed out that the 1,200 text messages and calls between the two were a small percentage of the 109,000 Williams logged over that same 22-month period.

Bob McDonnell followed the proceedings intently and occasionally laughed at a joke. Maureen McDonnell stared straight ahead.

At the end of cross-examination, the defense suggested that the only mistake the former governor had made was to “misjudge” Williams’s character. That wasn’t McDonnell’s only mistake, but it was a doozy.

Williams, in a slight drawl, spoke of how his friendship with the McDonnells was just a transaction to benefit his company, Star Scientific. “I don’t believe I would have been close friends with the governor and his family,” he explained, “if not for all the money.” The governor and his wife wanted even more, he said, but “I turned down a lot of requests.” In return for the cash, he said, he was able to launch his product at the governor’s mansion, was introduced to health-care leaders for his business and had his product placed in gift bags at a National Governors Association meeting.

Williams had a code of ethics all his own. He complained about the hassle of getting a generator for one of the governor’s daughters, but he spoke enthusiastically about getting a set of golf clubs for the governor’s son, Bobby. He was uncomfortable about the Rolex but didn’t mind spending $5,000 on cognac, because “everyone shares that.” He was appalled by a Bergdorf Goodman shopping spree he took Maureen McDonnell on but thought it a good idea to buy a dress for one of her aides.

“I understand that what I was doing was wrong,” Williams said. “It couldn’t be right for me to be paying all this money.” But he recalled the advice a golfing buddy who is a judge gave him: “If you loan money to the governor, it’s his problem, not yours.”

That wasn’t quite right, but the golfing buddy couldn’t have known McDonnell would let his family take the fall.

Twitter: @Milbank

Read more from Dana Milbank’s archive, follow him on Twitter or subscribe to his updates on Facebook.