Kingdom Hearts is an enormous source of power, and Ansem is nothing if not power hungry. He wanted to claim it for himself.
That's what sets Sora against him. Ansem's attempt to seize that power would have thrown the worlds into chaos, so Sora has to fight him to stop it. Greed for power, a hero in the way, and a showdown at the end — the motive really is that straightforward.