Flawed or not you can easily find a study that supports spray or gun.
Spray is for deterring bears that hanging around, looking for food, too close for comfort. This describes the great majority of encounters. Spray is great for giving the bears some negative feedback regarding humans, encouraging them to keep their distance. In the studies I've seen, yelling and throwing rocks at bears works even better than spray! Probably best to use both of those...
If a bear is in "I'm gonna kill you" mode, the spray won't stop it. Grizzlies who "attack" are usually just bluffing and veer off at the last second. That's why the "studies" saying that spray stopped a charging grizzly are bogus... they were going to stop anyway. There is no way in hell any animal in a committed attack is going to be stopped by pepper spray... that goes for bears, dogs, humans, etc. Lethal force is the only thing that will stop them.