I'm pretty sure this extends beyond ChatGPT.

The other day I meme-ified a photo with ChatGPT. Pleased with the style I fed that into Midjourney's "Describe" feature which aims to write an image generation prompt based on the image supplied. Midjourney did include a location as part of its output description and this was indeed accurate to the original photographic source material - this is all in spite of the image fed into the system being a ChatGPT-generated caricature, with what I thought was a generic looking background.

The lesson here is that these are still algorithmically generated images - and although it may not be obvious to us, even heavily stylised images may still give away a location through the inclusion of unremarkable landmarks. In my case it appears that the particular arrangement of mountains in the background was specific to a single geographic region.

While I think your story is entirely plausible, I wonder if there could be something else going on. Maybe ChatGPT puts the prompt (or an assumed location) in the image's metadata?

Not ruling it out, but this would mean both ChatGPT to put the metadata in the file, and then Midjourney read that metadata and put it into the img2txt output. (Midjourney produces 4 sets of text outputs from the single input image, two contained location information, naming the specific mountain chains it "saw" in the caricature image.)

Assuming it's not the metadata, it's a powerful use of AI, but also not one that I would not be too surprised about. It can be a useful investigative tool, or simply a fun way to hide clues for a puzzle.

Generative AIs just patch together memorized data. So parts of the original data can sometimes get back out like victim's hairs out of a monster's mouth.