Simple guess is there's software outside of your google account that tracks the location. Then, once you're google account is assigned to that phone, the google account is mapped to that software and therefore assigned to all of that phone's location history.