Zones can nest. There is no visibility within ASH for zones, but they are displayed in the GUI and you can filter on them, just as for individual locations.
PirateRealm -> Sailing the PirateRealm Seas = a location
PirateRealm -> PirateRealm Island = a location, but which maps to a specific island, which changes as you progress
Those two locations appear in the charpane (and api.php) as links to adventure.php?snarfblat=xxx
And that is a reason to leave them. I'll give a specific example later.
PirateRealm -> PirateRealm Island -> Crab Island = a location
Happens to have the same adventure number as "PirateRealm Island", but if we know you are adventuring there, my_location() returns $location[ Crab Island ] which has "giant crab" and "giant giant crab" as monsters.
Now, why would we want generic "PirateRealm Island" as a location?
Looking at my own session log:
I got the choice adventure to choose (this or that) island.
(At tis time, KoLmafia knew what my various choice options ere; it had a map from option number -> (text displayed for that option. 1 -> Crab Island, etc.)
This was a choice that, somehow, did not prevent me from doing SOME other things. I didn't know which isand to go to, so I ran "missingManuel".
That looked up every Manuel page and reported on which monsters had incomplete factoids.
Based on that idata, I selected the choice option - in the relay browser - for the Island which would get me factoids.
KoL accepted it!
And KoLmafia reported I had taken choice XXX option 3 which was "unknown" - since it had thrown away the choice options.
That is probably worth a closer look; I was still in a choice, although I had opened 27 Manuel pages, at least.
But, because I had navigated away from the choice - as KoLmafia thought - it forgot the options.
As I said - it should not have forgotten them. Peraps Manuel (questlog) requests should not count as "walking away" from the choice.
But the result was that _lastPirateRealmChoice was "unknown".
Which we now translate to the generic "PirateRealm Island" adventure, given a PirateRealm Island URL.
If you take that choice outside of KoLmafia, the same thing will happen: we will recognize you are in PirateRealm Island but will not know which one.
That's a degenerate case, but we CANNOT assume that every single click you make in the game has been watched by KoLmafia.