Why do I still want someone who treated me bad

So I dated this guy for 4 years. He was my first everything. I loved him more than anyone could ever know, I felt comfortable with him and safe with him. Our relationship was good, in fact I’d say majority of it was bad and was fighting. He never listened to the way I felt, he would put his hands on me, call me every name, put me down, compare me to people etc, but when it was good it was heaven on earth. At the end of the day mad or not he was the only one I wanted to have me and the only one I wanted to lay next to let alone give my body too. I haven’t talked to him not once since the day I told him I was done which was nearly 5 months ago. During this time he went to jail for a month and has now been out for about 2 almost 3. He texts me or calls me nearly every day even though I have him blocked on everything. He would just make number to contact me or try to show up at my house. I usually block them but sometimes I don’t and I see what he has to say but I never respond. I miss him, I miss his love, I miss everything wxcpet the bad. Everyone knows about how our relationship was and how bad it was so I can’t imagine me ever going back knowing the judgment I’d feel. I know I can’t go back bc he probably hasn’t changed, but like always I want to believe he’s different. He treated me so bad and made me feel terrible about myself. No matter what dates I go on and I never get a connection like the one I got when we first met. I wanted him to be the father of my kids. I wanted to marry him. I wanted things to change and that’s why I stuck through the hard times. It sucks feeling these feelings when I shouldn’t be