How do pictures get a label automatically added to top of each picture giving location?

I have seen iPhone that are giving a text location, such as Eifel Tower, Paris
Make sure Location Services is enabled for Photos, take a picture and you will see the location soon.

But remember location doesn't work for front camera.

Original thread: https://forums.imore.com/threads/how-do-pictures-get-a-label-automatically-added-to-top-of-each-picture-giving-location.370061/