Why do guys like to stay in a relationship even when it's toxic and they know they are hurting their girls?

My friends and boyfriend have been having issues. They fight and at times shout on eachother. They'd break up and then come back time to time. When she's hurt he apologises saying he'd be better but then after a while they start fighting again. She loves him a lot that's why she keeps come back but she needs peace and he does too. Sometimes she wants to go but once he talks to her she's back to him. Why doesn't he want to give up and let life just happen? Do guys just enjoy toxicity or they just have so much hope?
Why do guys like to stay in a relationship even when it's toxic and they know they are hurting their girls?
Post Opinion