Nothing was done wrong. Unfortunate and unexpected things happen and you make do with what you have.

Even retrospectively, it is unreasonable to expect to practice/train for use of a firearm defensively for a situation where you are firing a rifle at short distance (likely yards) at a moving target (bear) while trying NOT to shoot yet another moving target (person) in close proximity and under extreme stress.