Y do men cheat?

Found out my boyfriend cheated then I said since u wanna be with someone else u can. I'm moving on. Then he begs to stay and apologizes. But this isn't the first time. So why cheat on someone you love and don't wanna lose?