I think he did it t get Xion back too. He mentions something about everything going back to the way it was, as if by freeing KH, the Organization will need to keep him and Xion around to rebuild it, and everyone can continue eating ice cream forever!