In bear country you are required by law to prevent bears from obtaining human food:

https://www.nps.gov/grte/planyourvisit/bearsafety.htm

You can get a fine for not properly protecting your food/drink.