A fun side-effect of the iOS secret-tracking fiasco is that a lot of other different types of location data and transmissions to and from your smartphone are being conflated into a huge pile of fevered paranoia. But! Don't freak out.
To simplify all this (hopefully), here's a chart that lays out what's happening on three of the major platforms. (Click to embiggen.) Notice that what they do in terms of transmitting location data back to the mothership is pretty much the same across the board, differing only slightly in methodology.
The reason your phone beams a bundle of location data back home every so often is so that when your phone asks where it's at - like when you're using an app - it can be located pretty quickly using the database of known mobile towers and Wi-Fi hotspots (crowdsourced by you and your phone). No bigs. Apple and Google, further, collect anonymous data about traffic conditions when you're using GPS. Microsoft hasn't confirmed for us how it gathers traffic data, but we'd bet it's the same way. Also, NBD.
Every so often, if - and only if - you've turned on location services, your phone will hit up homebase with the package of information it's collected about mobile towers and Wi-Fi hotspots it's passed by. That data is anonymised, though everybody does assign a unique ID to the data. Microsoft explains it's so they can "can tell difference between one person going back to a location 15 times or 15 people going to a location once". This all happens in the background. And again, if you turn off location services, you opt out of all of this.
The difference between all of the platforms comes down to how they store data locally. Microsoft says Windows Phone only locally caches the single most recent location entry. Android apparently stores the 200 most recent Wi-Fi hotspots and 50 most recent cell towers it's seen.
As it stands, iOS maintains a persistent record tracking your location - based on mobile towers - in a database that's on your phone and on your computer, going back to whenever you installed iOS4, in a way that's fairly easily accessed if someone gains physical control of your phone or machine. There's no way to opt out. It may be a bug or "oversight." The best you can do right now, if you're concerned about it, is to encrypt your iPhone backups. And that's way, way different from what anybody else is doing with location data and services. There's no opting out, there's no knowledge, there's just creepiness.
All in all, though, the next time you wonder how much your phone or the company that made it knows about where you've been, don't freak out. Not too much, anyway.