There are some things about plants that we might be better off not knowing about. For instance, their idea of sex is even weirder than that of humans! Generally, flowers of ‘monoecious’ plants have male parts and female parts that do what they must to produce seed, which is often contained in some sort of fruit structure. Some plants can pollinate themselves. Ick! Others require separate but compatible pollinators.
Some plants bloom with both but separate male and female flowers. Female pine cones that produce seed are very different from the male pine flowers that produce pollen. Female flowers of spruce and several other conifers bloom higher in the canopy than male flowers. This promotes better cross pollination, since pollen must be blown upwardly but relatively randomly to the cones instead of simply falling from above.
Dioecious plants might seem less . . . weird. They actually have separate genders. Some are female. Some are male. Female plants require pollination from male plants in order to produce seed and fruit, though some can provide a few of their own male flowers if they sense a lack of males in the neighborhood. Ick again! There are certain advantages to every method of pollination, whether it makes sense to us or not.
One advantage of dioecious plants that does make sense to us is that messy fruit can be prevented by growing one gender or the other. Modern cultivars of Chinese pistache and maidenhair tree (gingko) are male, so can not produce the messy fruit that older trees are notorious for. Female date palms recycled from old date orchards are unable to produce dates without the male pollinators that do not get recycled.
However, this is a disadvantage if holly can not make berries because it lacks pollinators. Decades ago, scions (stems) of male holly were grafted onto female plants. Alternatively, male plants were sold along with female plants.