I'll take it a bit further than your friend. I think pretty much everyone is capable of cheating, given the right temptation and opportunity.
I'm not a naturally sexually monogamous man. I see love and sex as very different things and while I've no desire to love more that one person, I see nothing wrong with wanting sex with more than one person. Were DP OK with that, then I'd happily shag anyone who's interested, and I'd be happy for DP to do the same.
However, DP would not be OK with that, and I love DP and don't want to hurt her. So the only thing stopping me cheating is the risk of hurting DP, no great moral code. If there was no way of DP ever finding out, of being hurt, then I'd happily cheat. But that's never going to happen. Even if I travel half way round the world to cheat, there would still be the chance I would catch an STI, which I'd have to tell DP about.
So because I know I'm capable of it, I'm vigilant of my own behaviour.
I reckon there are three types of people. The ones who will happily cheat now and assume that they'll be able to hide it, or don't care about hiding it.
The ones who believe they will never cheat, the ones who are devoted to their spouse and wouldn't think it for a second. The ones who will walk headfirst into an emotional affair and not even realise they're doing it until they find themselves with their tongue down someone elses throat.
And the ones like me, who know what we're capable of and so take steps to make sure it doesn't happen. Ironically we're probably the least likely to actually do it.