Perhaps your issue is that you're trying to validate something you already know deep inside. Whatever you choose to label it after the event, you know it is wrong, and putting your children first is absolutely the right thing to do.

I wish I had a mother who did the same for me when I was in danger as a child. Regardless of what causes his behaviour, you know its wrong and it is unacceptable. It isn't up to you to fix it, nor is it up to you to give him an excuse to lessen the impact of what he does to people around him.

Your children are above all much safer away from the turmoil and so are you. Take care of yourself, and whatever causes his behaviour isn't something that can be cured or discounted. Personally, I think you've done the right thing by distancing yourself and your kids. Please don't question yourself or try to analyse it too much. The answer is simple. His behaviour makes him a risk and has a bad impact on your wellbeing and that of your kids. You've done what any responsible parent should.