From what you've described I think it might be possible that he have some kind of undiagnosed mood or personality disorder. Sometimes we act out in ways that don't make sense because there are underlying things going on.
I'm not sure how willing he'd be to go to a doctor to see about that but I think you could do some reading up on them in the meantime, so you can maybe see where he might fall.
SN: This is just a suggestion; I'm not a therapist or mental health professional, I just think it could be a possibility.*
Mental Health America: Personality Disorders
Mental Health America: Mood Disorders