I realize that my opinion as to what motivates John McCain is that of one who did not major in Psychology. But I offer this nonetheless....
His father was away through much of John's childhood. Craving his father's attention and approval became, in itself, a motivating pathology.
Mother's inability to "fix it" so that Father would be home more planted the seeds, I think, of John's disdain for females.
All conflicts on the planet are viewed through the prism of Viet Nam. His one shot at showing his most macho stuff was a loser. It clouds his judgment now as he accesses difficulties throughout the world.
Not a tall man, he suffers the typical Napoleonic complex often seen in otherwise insecure men.
Like W, he is driven to outdo Father. Like W, he's chronically pissed by the underlying belief that he never will.
I'm just saying.....