Why does this happen so often?

I was with a guy for about 5 years. I truly loved this guy but he obviously took me for granted, hence why I am asking this question. I know it has nothing to do with me because I did everything I could to show him I cared (within reason and I didn't let him walk all over me fyi).

But he cheated on me and lied to me consistently and I kept telling him and warning him that one day I was going to get over it and leave him and I don't think he thought I would.

Fast forward 5 years and I finally proved to him (once I had the proof) to show him I knew he was cheating on me and he begged and pleaded that I should give him another shot. Well, I didn't. But guys, what goes on in a guys head that so many of you (not all of course) take great girls for granted and only until you lost her you realize what you had?
Why does this happen so often?
Add Opinion