Some weeds act as trap crops, distracting pests away from valued plants. Insects seeking a food plant search by smell, and then land at random on anything green in the area of the scent. If they land on an edible "weed", they will stay there instead of going on to the intended victim. Sometimes, they actively prefer the trap crop.
Plants such as ryegrass, red clover, and white clover act as living mulches, by inhibiting the growth of any weeds that are actually harmful, and creating a humid, cooler microclimate around nearby plants, stabilizing soil moisture more than they consume it for themselves.
A common companion plant benefit from many weeds is to attract, or be inhabited by, beneficial insects or other organisms which benefit plants. For example, wild umbellifers attract predatory wasps and flies that eat nectar, but reproduce by feeding common garden pests to their offspring. Some weeds attract ladybugs or "good" types of nematode and provide ground cover for predatory beetles.
There is much more information on this subject and I suggest that everyone do their own research, as the subject is very interesting and enlightening. I have worked along side other gardeners who are quite anal about weeding, and others who are more laid back to their approach. Both harvest lovely produce. Personally, I'm for doing the least amount of hard labor if it gets me the same results. Why waste time and energy when you could be doing something more constructive, like sitting back and enjoying your garden?