Well for a short ride he was bent on power and lost sight of what's right and let it get the better of him. When Maleficent gave him the power to control the heartless he became addicted to this power and wanted it even harder and harder like a drug. That might sound a little rash but I'm sure you know what I mean.
Oh shit, how did I miss that tid bit of info? Well you bring up good points, while at one point he gained power for the pure thought of eliminating Sora, for the most part his motives were pure. The path he chose just wasn't morally positive is all. Not to mention that, darkness does have a hold on people, which can effect their personalities as well.
[EDIT]
Not just darkness, power in general can corrupt people fairly easily if they don't know how to wield it. Riku did, but it also affected his mind IE his aggression and drive to help Kairi.