Well, that's kinda rough. The idea of the gun butt as a weapon is so that when someone's right next to you, you don't have to suffer an AoO to still be useful. To be fair, I also don't think unarmed strikes (ie. punching a dude) should provoke either.
Having had bayonet training (admittedly, basic training was a long while ago, now), I'd agree that bashing someone in the face with the gun butt or using a rifle as a melee weapon is no more improvised or attack provoking than using it otherwise. It's not quite the same as smacking somebody with a bow, as firearms tend to be sturdier and can still fire after bludgeoning somebody.