Images can contain metadata. This is useful for things like “when was this photo taken?” or information about the camera, or a text description of what the image contains.
Many cameras (e.g. your iPhone) will include GPS coordinates of where the photo was taken. This is useful for things like “where were we when we had that amazing pizza?” or “where was that beautiful sunset??”.
This is much more problematic when the selfie you just shared includes the precise location of your home.