there is an important reason why you are always supposed to fight back if attacked by a black bear: statistically, it is usually an "offensive" attack
there are 3 basic black bear "attack scenarios"
1. you confronted the bear & it reacts, either to defend itself if it feels trapped, or to retain the food you are trying to take from it
2. you have food on you or in your sleeping bag/tent and the bear is after the food
3. the bear wants to eat you
grizzly bear attacks, otoh, are almost always "defensive"
1. the classic mom/cubs situation (black bears will seldom charge or attack to guard young - they generally run - but grizzly mamma will commonly go ballistic to eliminate the threat) - btw, some people say this kind of the attack is the only kind where running might actually be a good idea if you can get enough distance from the babies with the mamma between you & them
2. you are too close to the bear's food - grizzly will often defend the area of a kill/carcass, while black bears seldom do this (this includes if the bear decides your camp food is now his/hers)
3. you surprise the bear - grizzly's reaction is often to attack to mitigate a threat, black bear pretty much always runs away if it can
above categories supposedly like 90% of grizzly-man scenarios, with approx. 10% being where the bear decides to go eat someone
so, statistically, if a black bear is attacking you unprovoked, you should fight because odds are greater that it's offensive & with grizzly, you should not, because odds are, the bear is trying to eliminate a threat (defensive)
the limiting factor is the bear's motivation: in either case, if it's an offensive attack, your only chance is to have outside help right away, or to somehow fight the bear off/discourage the bear from wanting to put the effort in to kill you
in the lower 48 states, black bear attacks are statistically uncommon, but in canada & alaska, they are the primary cause of OFFENSIVE bear attacks on humans