Something you seem to be forgetting: intention. Riku didn't mean to do bad things, but after listening to Maleficent and Ansem's enticing words, in his mind, he was doing the right thing. They made him think Sora didn't care about him and Kairi anymore. They made him they that Sora stole the Keyblade from him. They made him think that he was just off galavanting across the worlds, fooling around with his new best friends, regardless of everything that had been happening.
By your logic, Robin Hood was wrong for stealing from the rich and giving to the poor, because he stole, and stealing is bad, even if the people were living a life of oppression and poverty while Prince John slept in the comfort of his own castle with everything he'd ever wanted.
-had just finished watching 1973 Disney Robin Hood-
That does clear it up a bit. But still, he killed the people on the island and kidnapped other people.
It's messed up that he wanted to sacrifice a little boy.
I'm just not understanding this.