Messed up relationship

I’ve been with my boyfriend for about four months now and when it’s good it’s great but he gives me issues if I hangout with my family or friends or when I have to take care of my son. Or if I need “me” time and want to be alone, he freaks out on me and calls me selfish and that Im a bitch. He says he should be a priority. It gives me a lot of anxiety and stress and I ended it. He also has no job and no car. He relies on me for everything.

Why do people treat others this way? I don’t understand it.