And Jesus being full of the Holy Ghost returned from Jordan, and was led by the Spirit into the wilderness,
Note 1 at Lu 4:1: Jesus was led into the wilderness by the Holy Spirit for the express purpose of being tempted by Satan. However, Jesus taught His disciples in Mt 6:13 to pray that they would not be led into temptation. There are certain things Jesus suffered for us that we should not suffer.
Jesus died for our sins so that we would not have to pay for them (Ro 6:23). Jesus took our sicknesses and diseases so that we could walk in health (Mt 8:17 and 1Pe 2:24). Jesus became poor so that we, through His poverty, might be rich (2Co 8:9). In this case, Jesus was tempted so that we would not be led into temptation.