Paladins are partisan paragons of purity, piety, and perhaps puritanical principles, passionately pining for perfection- problematic for pernicious parties.
They may follow a leader, but first and foremost they follow their code. They are obligated to stamp out evil wherever they may find it- is it surprising that he turned against you if he felt you were on the wrong path?
Off of the top of my head, I count no less than three instances when he'll flip out and attack you... but there may be more.