Security researchers, including Pete Warden have discovered that iPhone records location data, stores it in a file, and syncs it with iTunes. That means the data -- and the record of your location over time -- persists even when you upgrade or change iPhones. There's no evidence Apple transmits or receives a copy of this data or stores or uses it in any way beyond locally on your device and PC.
That Apple is doing this without disclosure is disconcerting, and as the researchers point out, it raises some security and privacy concerns:
"Apple has made it possible for almost anybody – a jealous spouse, a private detective – with access to your phone or computer to get detailed information about where you've been."