Most ports do not allow you to bring food items off the ship and vice versa. The concern is local food safety at both ends. Carnival will not pack you a lunch.
I have seen it work both ways. I have seen people bring food off the ship - nobody seems to check very carefully - and I have seen passengers lose those woven palm frond hats coming back on board.