There are plenty of reasons why your iPhone keeps track of all your locations: Many of your phone apps depend on accurate location tracking to function, from directions in Google Maps to looking for a nearby restaurant on Yelp. That precise location awareness extends to the images you capture with your Photos app, too.
Anytime you snap a photo or record a video with your iPhone, it creates information related to the file -- including the creation date and your location -- and then stores this data, called metadata, within your media.
A sneaky piece of data every iPhone photo gives away (and how to turn it off) - CNET