I don't think it's just the gunshot. Bow hunters, having shot elk, etc. have ended up with brown bear on their kills. Guy that started UDAP ended up clawed and chewed that way.
Bear can hear, and smell the death of their prey, or food sources, and, probably associate humans with dinner during hunting season.