I'm of the opinion that if it is during the posted open business hours then they need to do whatever is necessary to accomodate the customer (within reason). That, to me, would include brewing a pot of coffee, even if it meant risking that some would be wasted. They are a coffee shop; that is the product they sell. If they don't have everything available for some reason, then they need to make what they have on hand available and hope that they can satisfy their customers that way. It's just the cost of doing business.
And if a restaurant has turned off it's grills 1/2 hour before closing, then they are bad at business. If I show up at 9:30 and they don't close until 10, they had better be prepared to cook and serve whatever is on the menu. The cutoff point for any food service is the time the restaurant closes, not 30 minutes before. If they want to stop serving at 9:30 then they need to make that their closing time.