Cheating while pregnant

I see a lot of stories on here about women who's husbands cheat on them during pregnancy. What happens to men psychologically when their wives are pregnant that makes them act that way ?