Probably because they're hungry. Black bears have been on the increase in most of the East for a while now, but they normally don't venture into town unless they're looking for food. This can be caused by drought (which reduces the amount of acorns, berries, and other natural food in the woods), or by people feeding bears. Feeding wild bears is always a bad idea, even if they're hungry, because no matter how cute bears look while chowing down on your leftover linguine, they become accustomed to being fed, and they get used to being around people. They sometimes get peeved if they don't find food in a backyard, so they kill pets and will even attack people. Eventually such "trouble" bears (that people created) end up getting killed themselves by a local police officer or game warden.