Common Goldenrod, Solidago canadensis, with it's arching flower spikes, seems to be everywhere in the countryside in late summer. So why put it in the gardens? Well, it is an important food source for a number of the small beneficial native insects that would otherwise have trouble finding a decent meal-- all part of the ecological balance to ultimately keep the plant-eaters at bay. (This photo is about a month old; by now these plants have gone to seed)
One needn't actually put it in the flowerbeds, but allowing a few to grow in a small wild area in a corner of the yard can be a useful approach.