Originally, Xehanort was planning on turning Organization XIII into Xehanorts. It didn't work, however, as some where weak (Vexen, Zexion, etc.) and some where traitors (Marluxia, Larxene, Roxas, Axel).
So after they where all defeated, whoever was still loyal to Xehanort just went back to him...