The wasps are how figs pollinate. They're meant to die there. So if you're eating figs that lack a dead wasp it's likely because it's had a hormone applied to it to induce fruiting despite not being pollinated
It applies to almost every single one of the 855 recognized species of figs. There are cultivars and techniques to make the common fig fruit without being pollinated, but I wouldn't characterize it as a "myth"