Trials and temptations are the inevitable lot of fallen people who live in a fallen world. God does not send them, but He does permit them. Provided we handle them correctly, they serve to help us mature. But when mishandled, they can lead to great harm. The Children of Israel were a great example of this.