It has absolutely nothing in common with hitting your spouse. It is extremely frowned upon to openly display it but relatively accepted if it's discreet. It's very correlated to the relation a population has to sex. People in very religious countries where sex is seen as moraly dubious have very strong view against infidelity and people in countries with a more casual view of sex don't think it's such a big deal.
France is a relatively extreme example. The last Pew Research Center study shows that only 47% of the French thinks that infidelity is moraly unacceptable and there is no large gap between women and men answers.
It's just not seen as morally disqualifying. People view cheating as a mostly private matter and acknowledge it happens. When it was revealed that the former president was having an affair with an actress, it barely impacted his popularity.
Nobody likes it but feel powerless to change it.
But I wouldn’t say it’s viewed positively or even neutrally.