In Mark 1:13, the story of Jesus going into the wilderness, where he was ministered by angels is an allusion to Elijah (1 Kings 19:5-7) who was ministered by an angel and in the wilderness forty days. In Mark's Gospel, there seems to be a form of coordination of purpose between the Spirit, Satan and the angels. The Spirit drove Jesus into the wilderness, Satan's role seems to be to test Jesus rather than to turn him aside from his mission, while the angels are present during the temptation, ministering to Jesus. In this, the earliest of the New Testament gospels, Satan could arguably still be seen as the loyal assistant of God that he had become in Judaism, and therefore testing Jesus' faith. An exegesis of the passage does not tell us how the angels ministered to Jesus, but the original audience of the gospel, reading διακονέω as consistent with 'waiting at a table' or 'caring for' may have concluded that the angels provided sustenance to Jesus.
In copying from Mark, the author of Matthew introduced some new material attributed to the hypothetical 'Q' document, about Satan tempting Jesus, but seems to have found the presence of angels at the same time incongruous, thus delaying the presence of the angels until Satan departs. Without the presence of the angels, Matthew tells us that Jesus fasted for forty days.
1The later synoptic gospels portray Satan's intentions in tempting Jesus as clearly evil, as well as introducing the belief that Jesus actually fasted for forty days. We can not assume that the author of Mark had these things in mind.