As we know during the Saiyan saga, Goku was wished back to life at the same time as the arrival of the saiyans on earth. King Kai then realised Goku had to travel all the way back via Snake Way. Because of this, Goku arrived too late to save some of his friends.
Now here it comes. These 4 people (Piccolo, Yamcha, Tien, Chiaotzu) who died by the hands of the saiyans, also went to King Kai for special training just like Goku. However, when they were wished back to life with the dragon balls they were instantly transported back to the location of where the wish was made.