Because relationships---even bad ones---tend to be habituating, even when they are less than perfect---and apparently yours is definitely less than perfect.
Your situation is not at all unusual---at least the part about you "loving" him despite the way he treats you.
But why do you think that you wouldn't be better off with someone who loves you in return----and shows that love to you?