Actually they do start out knowing each other as stated here
"Birth By Sleep takes place about 10 years before the original Kingdom Hearts. Before Sora wielded the Keyblade, there were other Keyblade masters. One of these masters, Xehanort, disappeared one day along with his apprentice. Another...