I have waited a bit to write about the hoo-ha surrounding the accusation that Apple and Google were tracking user locations via GPS information stored in iPhones and Android phones. I suspected there was more to the story than was being cited in the news. And I was right. Apple has released a Q&A that explains what is going on, and it is indeed benign. Note that this applies only to Apple--I have not seen a similar statement from Google, although it is likely to appear soon.
Apple collects the location of WiFi hotspots and cell towers near an iPhone user so that applications that want to do things like tag photos taken with the cameraphone can work quickly, as opposed to having to wait as much as a minute or two to get data from a GPS satellite. There is a file that is transmitted to Apple, but data is encrypted and anonymized so that individual user cannot be identified. It is true that if you take that file from your iPhone, you could develop a rough map of where you have been, but only the owner of the phone or someone who knows the owner of the phone would be able to say, "Okay, I know where you have been." Apple cannot do the same thing because of the anonymity.
Having said that, the existence of the file on your phone could be used by law enforcement and/or become the subject of a sub poena and that data could be used to incriminate you rightly or wrongly in some legal proceeding. Apple intends to provide an update for the iPhone that will give users more control over this data. And that's the right thing to do.