It's to make it a properly defensible location. You can't just drive a boat up to the beach when the nation's occupants want to shoot Americans, even the ones helping them. That is how you get dead Americans, a damaged boat, and no aid actually flowing.
I very much don't think anybody will be shooting the people giving them food. I know Western people think of Hamas as like ISIS and Al Qaeda (both of which I would also assume wouldn't do this but for argument's sake), but their ideologies are too different.