I think that every so often, someone tries to disrupt the stability of the worlds and a hero steps up. The very first hero created the doors to seal Kingdom Hearts and the Keyblade. At the very end, this hero became one with Kingdom Hearts and helps out heroes when a new villian tries to step up. I think deep inside Kingdom Hearts, he just creates Keyblades and Keychains and assigns them to people based on their personalities. And at the very end, I think Sora is going to become one with Kingdom Hearts.