Entire ecosystems of flora and fauna exist on and around the human body. They graze the skin cells and oils on our bodies, make nests in our hair folicles, eat, sleep, and make babies while we do the same.
The cookie angle is most likely a benign causal placebo. Sometimes ants just end up where they shouldn't.