Apple collects AR (augmented reality) data to improve location accuracy in Maps.

It says it’s working to improve the speed and accuracy of augmented reality features in the Maps app.
When you use features in Maps, such as walking or choosing the best location, Apple collects information about “feature points” that represent the shape and appearance of fixed objects, such as buildings. The data does not include photos or images, and the feature points collected are not human-readable.
See also: Google Maps: Strengthens privacy protection
According to Apple, Maps uses machine learning on the device to compare feature points with Apple Maps reference data sent to the iPhone. The camera detects moving objects, such as people and vehicles, with Apple only collecting the feature points of stationary objects. Comparing these “feature points” with Apple’s reference data allows Maps to accurately pinpoint a location and provide detailed walking directions using augmented reality.

Apple's data collection is encrypted. However, if you wish to prevent it, you can disable the use of AR data. To do this, open the “Settings” app and go to the “Privacy & Security” section. Then, select the “Analytics & Improvements” option and proceed to disable the “Improve AR Location Accuracy” option.
Source: macrumors.com
