God allows you to make moral decisions under pressure (testing) to build spiritual integrity because it’s the only way you can have a spine for God to match a heart for God. Satan wants to use it to destroy you (temptation).