The short answer: The ammo. The bow only determines the arrow's accuracy (and, occasionally, offers a damage boost as well). It's the arrow itself that pierces magical protections.
In some cases where the bow/crossbow generates its own ammo (Gesen's Bow and the Firetooth Crossbow) then it can be the weapon, but only because the created ammo counts as the same enchantment level as the weapon itself. I think.
Comments
The long answer: Still the ammo.