Just my thoughts from 20 years experience living in bear country and having many interactions with bears. If I go alone in the woods I carry bear spray, it has been demonstrated that it is effective. If I am with a group of people we carry bear spray and a shotgun. Most people are not proficient enough to use a firearm in a crisis situation and can cause more problems. Once a firearm is used it becomes a critical situation with the bear either dead or even worse wounded. If you use bear spray you will not accidentally kill or wound any of your companions.
My thoughts on this specific incident are it was just bad luck that the bears did not hear the humans and avoid them as most bears do. Bears are not normally aggressive towards humans. I hope the injured heal quickly.