Matthew 4 tells not only of Jesus being tempted by the devil but also the beginning of his ministry.
The very first verse starts off by saying, "Then Jesus was led up by the Spirit into the wilderness to be tempted by the devil." This verse here conveys that this temptation was inevitable and almost a right of passage for Jesus, seeing that he was led up by the Spirit. This occurred right after his baptism which further illustrates that this was something that Jesus had to do. Possibly to show us that he himself was not immune to the temptations of