Why does she keep forgiving me?

I've known this girl for 2 years.A year ago we started dating and had a relationship , few months ago she broke up with me because I was really aloof, which I regret, can't help that I'm the type that develops feelings quite slowly.

Anyway since we broke up my ego took control and I changed, I started acting like a dick with her, starting arguments out of nothing , acting busy when I'm not, getting paranoid and stuff that aren't really in my character.I really love this girl and I don't know what the fuck is wrong with me and why I act like this sometimes.Everything is good for 2-3 weeks then I snap and start some bullshit argument because I listen to my ego.I've never been like this, in fact she's the only person I've ever been like this with , this behavior of mine only started a few months ago.
Either way with all the shit I'm pulling she's always forgiving me and trying to get close to me, then I pull one of my stunts and she distances herself a few days and this vicious cycle keeps repeating and I want to put an end to it.She says things like " I really don't know why I'm still talking to you".
Why does she keep forgiving me like this?
Is she hoping I'm going to change?
Why would she want me to change?
When we get along we flirt, we have fun, we laugh a lot, we never get tired of talking, we have a really strong connection but with all this shit I'm pulling she just doesn't trust me to get closer to me.
I want to end this cycle but I need a woman's insight..
I came up with something that best describes my situation :
"Once she fell in love with my soul, now she hates my ego" !
I really don't want to treat her like this but I don't know what's happening, everything is so strange for me too..
I have decided that I really want to regain her trust , tho because of my ego I'm really having trouble with my patience...
How does one align his soul and ego in order to restore balance?
Why does she keep forgiving me?
Post Opinion