Part of it may stem from his time as a prisoner of war.
A Cuban shrink interviewed McCain while he was a POW and produced a frightening psychological profile of the young flyer, which concluded he was borderline paranoid schizophrenic.