How can you miss someone who was no good for you?

So just a few months ago I ended a long distance relationship that had lasted two years. I am in love with the guy and I gave him my virginity and everything I had to show him I loved him. Well I noticed he stopped putting forth effort and would judge me for being me. It seemed as if he didn't accept the real me. I also noticed that the relationship wasn't fun anymore. And yes I know that relationships take work and you shouldn't run when things get hard but it wasn't that the relationship was hard it was more like I couldn't laugh my real laugh or I couldn't think my own opinions. He wanted me to just agree with everything he said and he wanted me to give him so much love but wouldn't return the favor. Things originally started going bad when I told him I started to hang out more with this guy that was Mexican. Well the guy I was in a relationship with just lost it. He thought it was disgusting of me to even think about hanging out with a Mexican all the time. He said if i caught feelings for the Mexican guy that I wasn't worth shit and that I was just a disgusting piece of shit and that no one would ever want me. I mean he called me every name in the book and ended up saying all these comments that he knew would hurt my feelings. Like deeply hurt me. After I ended things I realized that he was the reason I say sorry all the time. Someone could just start walking at me and I'll move to the side and duck my head and say sorry. If I upset someone I immediately bow down and say sorry over and over usually till things calm down. Sometimes it annoys the person even more and I try not to irritate people but it just happens. The sad part is that I know he was no good for me but I miss him.. friends of mine who know that situation always call me insane for missing him but I just can't help it. He was there for me through some tough stuff and now he's no longer in my life..