Answer: when you offer it to a married woman.
When you offer it a single woman, it's a status play, and that vestigial chimpanzee part of her brain fills the cookie with all kinds of social significance.
I discovered this quite by accident when my wife sent me in to work with several boxes of cookies, more than I could ever eat. Normally, I would leave them by the coffee mess, except here we don't have a coffee mess. So I walked them around the cube farm. "Wanna cookie?"
However lame this may have been, when it was all over, I looked back and realized that all the married women to whom I had offered a cookie had accepted it. All the single women had not.
It's very simple," Mrs Φ explained later. "Single women know perfectly well which are the men for whom they would maintain a romantic interest, and they are very careful not to do anything that might be construed by any man not in that category as encouragement."
The flip side is that men then feel entitled to interpret any act of charity precisely as encouragement.
And so it goes.