The fig wasp enters the fig to lay its eggs, but it can only reach the base of the short flowers. In those, the baby wasp hatches and eats the sweet flower. The wasp can't reach to the bottom of the long flowers are pollinated by the wasp. Those flowers develop seeds to grow more figs.
The fig will not ripen until it has been pollinated by a wasp, which means that any ripe figs you eat also contain nice, crunchy, baby wasps. Yum!