I have a theory on why cookies at various academic department sponsored events tend to be low quality in general, but not completely inedible.
If the cookies are very good, the first few people who arrive at the event have a feast of cookies, and there are only a few crumbs left for the rest. To compensate, the event needs to have many more cookies and word gets out, so that in the end it costs too much to keep the quality up.
If the cookies are too bad, nobody shows up and you end up with no attendees to the event. Or if people show up, it becomes a matter of nature to have complains on the quality of the cookies, with ensuing food fights and/or bad joke contests.
The happy medium are cookies that are good enough to be an incentive to students who go for the free food, but bad enough so that nobody really wants to eat more than their share. I’m sure this general lesson applies to a lot of other social activities.
I have a lot of circumstantial evidence supporting my case.

Another good theory slaughtered by experimental data. Case at point: the pastry at the IAS. I’m not sure they kept it up, but back in the days those were plentiful and of amazing quality. I am not sure how productive people were able to be after tea time, but at least it was late in the day.
Erm, not exactly a physics department with a lot of students nearby. The theory does not apply in this case.
Actually, at UBC we have weekly tea time with reasonably good sweets, and tasty non-sugary snacks as well, for those of us who get easily saturated with sugar (speaking as one, I really appreciate it). It is actually working pretty well bringing people together to chat. But, the quality stops with the snacks, coffee and tea is still pretty much undrinkable, and for the colloquium we still have the generic physicist cookies (and not, say, crackers and cheese, or fruit, or tortilla chips, etc. etc., all of which cost the same). I blame lack of imagination.
As Moshe said, our institution has a tendency to provide better-than-average cookies at seminars and lectures, in order to entice attendees despite the abominable quality of the coffee and juice. Another convenient way to increase attendance is to offer extra credit to undergraduates for showing up; however, that has a tendency to decrease the overall quality of conversation after the fact.
I have yet to see an institution that doesn’t have malfunctioning coffee makers, and a decent quality of cookies outside of special events.
On an average day, they’re usually unedible (which doesn’t stop them from dissappearing by around 3pm)