Every First Sunday of Lent we get a gospel passage about the temptations of Jesus. Right after his baptism in the Jordan--when, though he didn't need purification himself, he identified himself with sinful humanity--the "Spirit drove Jesus out into the desert, and he remained in the desert for forty days, tempted by Satan" (Mark 1: 12-13). This happened right before Jesus began his public ministry of teaching and healing. Does it surprise you that Jesus was tempted? It shouldn't. Temptations occur not simply because we're sinners. They happen to those who are good, as Jesus was perfectly good. We have an enemy who wants to knock us off the right path of doing God's will, just as he tried with Jesus.
Why does God allow temptations? There must be something in them that is good for us. What is that?
First, humility. God does not prevent temptation because it serves the purpose of keeping us humble. St. Paul comes to mind. In 2 Corinthians 12 Paul writes about "a thorn in the flesh," "an angel of Satan" that afflicted him. We are not sure exactly what this was, but it could have been a particular temptation, a moral struggle. That makes sense given how Paul also wrote about his struggle with sin in Romans 7. At any rate, he didn't like it at all and thought that he would be a much better apostle and person if he were rid of this "thorn." He prayed for God to take it away. The answer he received is a common answer to prayer--"No." The Lord told Paul, "My grace is sufficient for you, for power is made perfect in weakness." It is as though God told Paul that without this "thorn" he would think he was perfect. He would become puffed up and proud, self-sufficient. This struggle brought Paul to his knees, leading him to pray and depend on God, not himself.
A second reason is that by battling temptations we exercise and grow in virtues. A struggle with impatience is an opportunity to exercise patience which can then grow. Virtues don't take away temptations. They are spiritual muscles that need to be used and exercised. Temptations give us the opportunity to do just that. For every temptation there is an opposite virtue which God is giving us an opportunity to develop.
Thirdly, through temptation we grow in compassion, just as Jesus did. In Hebrews 4 we hear that "we do not have a high priest who is unable to sympathize with our weaknesses, but one who has similarly been tested in every way, yet without sin." In the desert of temptation Jesus grew in the compassion that would later motivate him as he reached out to sinners. Our temptations can similarly help us to be more compassionate to others in their struggle. "There but for the grace of God go I."
Lastly, temptations can draw us close to Jesus. If we give in to temptation and sin, we move away from Jesus who won't abandon us but will seek us because he is the Good Shepherd who cares about his lost sheep. But if we struggle and battle temptation, despairing of our own strength and ability and turning to the Lord in our need, shouting, "Lord, save me! I am drowning!" (see Matthew 14: 22-33), he will reach out and grab us and hold us close to himself. Sharing a struggle brings people closer to one another. Sharing our struggle with Jesus can bring us closer to the one who has also struggled against temptation and won.
Temptation is part of life, part of following Christ. He shared our life, with all its struggles and temptations, suffering and even death itself. He's "been there, done that." While we may feel far from him when we are being tempted, the reality is that we are sharing in something that he himself went through. He is close to us in temptation and he understands.