Seed abortion and environmental stress
Inside the female part of a plant (the pistil) lies one or more unfertilized embryos. In order to develop into a seed, the embryo must fuse with a sperm cell (released by a pollen grain). The stigma (the sticky tip of the pistil) is a sort of gatekeeper, rejecting pollen from other species and, in species that require cross-pollination, the stigma even rejects pollen from the same individual plant. If the pistil gives the pollen the green light (a biochemical signal), the pollen grain releases sperm with the hope that they might fertilize an embryo.
While a female flamingo might be able to judge the health of a male by looking at their plumage (source), the stigma can’t tell much more than the compatibility of the pollen grain. The plant risks wasting energy developing seeds doomed to fail (due to genetic defects). This is particularly risky for female plants who then bear the energetic burden of “raising” the young.
Aborting seeds can also function to increase the overall survivability of a plant’s seed crop by sacrificing some seeds as a sort of false advertisement to potential predators. Say a plant aborts 50% of its seeds. This would mean that 50% of the seeds encountered by foraging seed predators (like finches or mice) will be a waste of predator’s time and energy, which ultimately deters future predation on the seeds. These aborted seeds may be genetically inferior (e.g. self-fertilized seeds: source).
For some species, when the fruit is parasitized, the whole fruit may be terminated and shed early rather than just the seeds. Commercial sunflower (Helianthus annuus) is occasionally parasitized by broomrape plants (Orobanche spp.). Parasitized sunflowers have smaller flower heads, lower oil production, and aborted seed heads than healthy flower heads. The plant effectively shunts resources away from an infected part of the platn. The same thing occurs in barberry (Berberis vulgaris). Shrubs parasitized by the specialist fruit fly, Rhagoletis meigenii, can lose up to 100% of their young. However, if a barberry aborts most of its seeds when it is first parasitized, the plant can successfully produced a crop (source)
The consistent theme here is that reproduction is always a cost, and a cost that must be weighed by females against the other background essentials of growth, maintenance, defense, that also require energy, nutrients, and time.