It's simply assuming that, for hit, the total hit is the sum of the character's natural hit and the weapon's hit (when no other modifying accessories are equipped), and similarly for attack. Then, one goes back and subtracts the character's natural hit/attack from the total hit/attack.