If you did not catch the sarcasm, telling me a handgun is the best defense against a bear attack is the equivilant of telling me the sky is blue. It is not some amazing statement.
In the three cases where a gun “failed”, two of the cases the idiot did not even use it properly and the third was a .22 calibre.
In summary, of course a handgun is the best weapon, and the bigger the calibre, the better. It is designed for close combat unlike a rifle, easy to carry, easy to pull, easy to aim and all can be done in a short period of time.
I am fairly sure a Desert Eagle fired at 5 yards at the head of a bear would eliminate the threat, assuming the holder can control his fear to get the shot off and aim properly.