Also, a lot of them disappear on the ice each year.
You also aren’t going to get a fully automatic one as a civilian without a massive amount of paperwork. A military M4 is even less adequate due to the short barrel length.
Typically, a 12 gauge with 3” slugs is the minimum ‘good idea’ big bear defense gun.
45-70 with modern (high pressure) loads, or a 30-06 with heavy bullets (200gr partitions) are also considered good to adequate - at least for Kodiak brown, which is close.
The issue is with shot placement.
Someone successfully defended themselves against a Kodiak brown bear attack with a 9mm because they were lucky and got a great shot through the nasal cavity from 6-8ft away. Albeit with extremely hot ammo. [https://www.americanhunter.org/content/alaska-outfitter-defe...]
do not underestimate how difficult or dangerous that shot would be to make. The shooter had been a hunting guide in that area for 30 years.
The same bear, if the shot was a couple inches higher, would have been able to keep going even if hit with a 12 gauge slug. They have highly armored skulls. [https://www.reddit.com/r/badassanimals/comments/14die7f/kodi...] Males in particular are also used to (and regularly do) literally fight grizzly bears, so are not cowardly opponents.
Many people disappear in that area every year, while armed. Eaten by bears is the presumed cause for a significant portion of them, but no one can tell for sure since the bodies never get found.
The US Air Force used to issue (literal) bazookas to airmen it stationed above the arctic circle as it was the only adequate man portable weapon they had that would consistently and reliably work if they could hit the bear with it.