You can't bring any liquids either, they once took a canteen of mine and started shaking it, after which they proceeded to ask me
"...C'est vide?"
"What?"
"C'est vide? Ce bouteille?"
"I don't speak Fre---"
"IS THIS THING EMPTY?!"
"Y-yes..."
Everything goes through a scanner anyway, and if they notice container-like objects, they'll check them out.
We have to put our liquids in a separate bag, in small bottles. Limited to 1 bag per person.
Also for the food remark, it's the same reason for not allowing non indigenous animals. People get nuts when you bring plants and fruits. Hell. For good reason too.