Isaiah 57:1-2
The righteous man perishes (at the hand of evil), and no one takes it to heart; faithful and devout men are taken away, while no one understands that the righteous person is taken away (to be spared) from disaster and evil. He enters into peace (through death) they rest in their beds, each one who walked uprightly.
God loves those who walk righteously before Him. He also rewards and protects those who keep His commandments. God will spare those He loves from disaster and evil, so they can find peace with Him in heaven. Our lives here on earth are protected by God when we have right standing before Him.