Any idea why there a wasp larva in the middle of nowhere?

There were no wasps in the area, I had thoroughly explored it all, it’s from a path I frequently take to the nearby town. And then, at the entrance of the town, it was just chilling there out of the blue. The nearest wasps I could find were many overmap tiles away, no nests or anything remotely nearby. It just seems so inexplicable to just fine this random wasp larva where I had already been a dozen times before.

It could be hallucination. For some reason, static monsters like red dragons, turrets and larvae tend to linger even after character stops hallucinating.

Do you want to know from a story or lore perspective, or do you want to know from a mechanical computer programming perspective?

I don’'t have any idea as far as the code goes.
As far as the story goes, as in real life, things happen that we cannot explain. That does not necessarily mean that they have no explanation, just that we can’t figure it out, or even that we can’t figure out which of several unlikely options is correct.
In the lore, there are dimensional portals opening up. This explains the monsters. It has been used to justify adding in extinct species such as dinosaurs, humans transported from much earlier historical eras such as the churl and the caveman, and animals not normally found near New England.
Mundane reasons might also apply. Something might have grabbed the larva, travelled with it, and ultimately dropped it. The larva may have escaped its home and travelled much farther than anyone would have expected it would be able to. It may be the last survivor of a nest that was very thoroughly destroyed already. Conceivably it might even have hatched from an egg that ended up far from home.
But we don’t have any way to know its history.

I’d prefer to know more along the lines of game mechanics, but I do like that concept.

Maybe there is a nest several levels above the larva as if a tower was supposed to be there, air tiles in the nest would result in the larva falling to the ground. If not that then I’m not sure.