Feeding the bear

I don't know how close I'd want to get to a bear, but I remember from the Ken Burns' documentary on National Parks, that there was a period where bears would hang out by the entrances to the park and beg for food and people would feed them. The bears seemed pretty used to humans and as long as they were getting fed, didn't seem to be much threat. I'd hate to be the visitor who wasn't ready to give the bears food though when showing up at the park.