But if that were true, you'd think that you also would get a shield's enhancement bonus when you used it to bash. But you don't. After all, the shield is magical so why shouldn't you get its enhancement bonus when using it as a weapon? Obviously, you might counter with something like: well, the shield's magic is designed to protect, not to attack; therefore when you use it to attack, the protective magic has no role; the bow, on the other hand, has magic is designed to attack and not protect. It therefore should apply even if the bow is being used in a way for which it is not designed.
Reasonable minds can disagree about that issue. In the end, it's tangential to the larger question -- namely, is the roll for the bowman treated as a ranged attack roll (such that all his modifiers to a ranged attack roll would apply) or is it treated as a melee attack roll with an improvised weapon?