Here are the specifics from Apple:
"To provide location-based services on Apple products, Apple and our partners and licensees may collect, use, and share precise location data, including the real-time geographic location of your Apple computer or device. This location data is collected anonymously in a form that does not personally identify you and is used by Apple and our partners and licensees to provide and improve location-based products and services. For example, we may share geographic location with application providers when you opt in to their location services.
Some location-based services offered by Apple, such as the MobileMe "Find My iPhone" feature, require your personal information for the feature to work."
This type of data collection to support location-based services is nothing new; you will find similar wording from other smartphone and mobile device manufacturers whose products can use location-based information.
Thankfully, you can opt-out of both iAds and data collection. You can also set your iOS 4 device not to allow location information to be sent, either on an app-by-app basis or globally for all apps and services.