"the weapon" - noun phrase, subject - What does the weapon do?
"gains" - verb - Okay, the weapon gains what?
"a +1 bonus" - noun phrase, direct object - The weapon gains a +1 bonus to what?
"its" - possessive pronoun - "The weapon" is pretty clearly the antecedent. "The weapon" possesses the coming indirect object.
"to its attack and damage rolls" - prepositional phrase, indirect object - The weapon's attack and damage rolls.
Thus, all together, "The weapon gains a +1 bonus to [the weapon's] attack and damage rolls." Unless you are using the weapon's attack and damage rolls when casting your spells--which is both not supported by the rules ("Attack Rolls," PHB 205) and a huge nerf a large majority of the time--you do not gain this bonus on spells.
If the authors had wanted to say, "While using your pact weapon as an arcane focus, you gain a +1 bonus to your spell attack and damage rolls," they very well could have--and that's exactly the kind of language that they used on, e.g., rod of the pact keeper and wand of the war mage. Instead, they made the +1 bonus to the weapon's attack and damage rolls as linguistically separate from the prior effect as they could, by placing it in a new paragraph and writing a transition which introduces it as a separate effect.