The amazing list of Israel's sins in the wilderness includes, idolatry, sexual immorality, testing God, and complaining about that which God provided. All of this, Paul says, took place for our learning. Then Paul says something that ties this text in with Luke. Here's the clue to this passage. God does not keep us from trial and temptation.
Temptation comes with the ability to choose good and evil.
It is a part of the human condition. We spend so much of our lives on things that do not count. A Prayer of Confession O Lord of all life, we confess that we have wandered far from your ways and have chosen that which does not satisfy instead of your will. Your thoughts are higher than ours and your ways beyond our comprehension and we have failed to seek you as we should. Instead of peace we have labored for restlessness and instead of the clear insight of your guidance, we have turned to our own counsel.