Yes, when you use the location services in, say, a new city then your device will download and cache the WiFi location data for a large radius around that initial lookup the next time it has an internet connection. It's pretty cool, actually.
That database isn't infinitely large, as unused location information will be removed as new location data comes in.
Android achieves this well, too. I guess Apple are just following Google's move (remember when Google recorded all the wireless access points with their streetview vans?)
'Look at the video for session 115, "Using Core Location in iOS". Skip to around 13:45 for the discussion of "Course Cell Positioning" where they discuss the cache in detail.'
That database isn't infinitely large, as unused location information will be removed as new location data comes in.