How to zip contents recursively under the directory foo/*.*?

It is because you tell it to do that ;-)

I would do something like this:

cd /tmp && zip -r /tmp/bar.zip ./foo/* >/dev/null 2>&1