If the female wasp crawls into the caprifig, she can successfully lay her eggs and die. The males hatch first, mate with the females, dig tunnels out of the caprifig, and die. The females, now covered in fig pollen from the caprifig, fly out to begin the cycle again. If the female wasp crawls into a female fig, she will not be able to successfully lay her eggs despite pollinating the fig with pollen from the caprifig she hatched in. The fig will absorb her body and her eggs as the fruit develops.
https://en.wikipedia.org/wiki/Reproductive_coevolution_in_Ficus