He didn't resign because of two affairs. He resigned because there were a LOT more than two affairs. I'm sure they wouldn't stop coming after enemies and the press smelled blood in the water.
The second one was a direct report to him, and I wouldnt be surprised if he granted her favors in exchange for the sex (whether it was "promised" or not) typically no executive 'survives' having an affair with a direct report and stays in the company.
Who you have an affair with matters more, in this case a Chinese spy wasn't enough, which almost makes you think, he was not the only one at Nvidia who knew.
..and because American culture is really prudish about that.
The French and Italians wouldn't blink an eye. Us Brits, we'd talk about it, he's get a slap on the wrist but wouldn't be sacked.
It seems to be a uniquely American thing that the CEO can basically do anything (lie, cheat, fraud etc) just as long as he doesn't get caught with his pants down.