They made Castle Oblivion their new base. They already new of Castle Oblivion's memory-related abilities. When Namine was born in Castle Oblivion instead of Twilight Town, I assume Organization XIII (mostly Vexen and Zexion) put two and two together from that point. Sora was conveniently nearby just after the End of the World, so they took the chance to lure him to Castle Oblivion in order to experiment with Namine's powers. As time went by as Sora, Donald, Goofy, and Jiminy journeyed up the castle, Marluxia took advantage of Namine's abilities, and we all know what happened then.
Of course, this is just a likely hypothesis.