Schooldays, what you are doing is called 'untangling the skein of fuckedupness'.
If you can work out WHY he does this, then you can make sense of it.
The answer is very simple: he is the centre of the universe and whatever he wants is all that matters. Sex, now? Food, now? Being looked after in all things? Loo roll in the bathroom, clothes washed, house clean, a cup of tea? These things, what he wants, when he wants it is how the world must be.
You are an extension of his bidding, just like his arm or leg is, So, if he wants something, then YOU should automatically do his bidding, just like an arm or hand does. Hands don't want to be listened to or talked to, so STFU. He is not interested in you, what you think, what you want, whether you hurt or if you are lonely. Shut up about all that sh*t, it doesn't do anything for his benefit so stop it with those... DEMANDS. Cow. Whiny bitch. Stop nagging, for chrissake.
If you step out of line by not doing what he wants, or trying to make him think/care about you, then he is entitled to do ANYTHING to put you back in your place. Shake with rage, threaten, shout, frighten you - ANYTHING to make sure that you STFU with all that droning and all his benefits being Master of the Universe continue.
Stop trying to work out why. He is not depressed. He is not confused. He is not lost in pain and needs 'loving' out of it. He knows EXACTLY what he is doing. He does it because it makes HIM the centre of the universe and you belong to him. It really is this simple.
So the question you need to ask yourself: is this person a friend? Is this how friends treat eachother? What are your values, what will you tolerate? Why are you involved with someone who doesn't care about you?
Stick to those questions and they will keep you strong.