In the context of garden ecology I look at it a little differently. We recycle our soil from year to year. We just finished loading the last of our reserves into the flourishing containers of potatoes, which threaten now to take over the whole yard. The soil we empty from the pots into our winter bin comes right from the stuff we used all summer. It's a cycle. But not a closed cycle. We are taking something from that soil every year. The leaves and flowers and roots all derive nutrients from the soil. Especially those flowers. Every gardener knows that to get great flowers you need micronutrients.
So what does this have to do with deadheading? Those spent flowers are reservoirs of nutrient molecules. The life of the flower is short, no time to translocate nutrients back to the plant. If we throw away the dead flowers we're throwing away nutrients that we have to replace by going to the garden store, buying fertilizer, lugging it home, and putting it in the soil. I prefer to recycle the deadheads into the soil, let the microbes break down the plant material, and come out next summer with a new crop of healthy potting matrix.