God had supernaturally protected His people and had kept the snakes out. But when they broke their covenant by rebelling and complaining it caused God's protection to withdraw. It was only then that they were bitten.