Just accept that it's post KH: CoM nonsense and was never meant to make sense to begin with, and suddenly it's alright. Because there's a point in that game where Sora just asks questions to show even he doesn't know what the eff is going on anymore.
That's inception at its most basic level. Wouldn't it make sense that more advanced applications might involve implanting a whole new personality into a person? A personality is just a bunch of ideas, after all.
I thought you meant the 'dream within a dream' bit but suddenly I realize they kind of are performing actual inception on him aren't they?