John's Purpose in Writing
John was aware of many things Jesus did which he purposely did not report:
Now there are also many other things that Jesus did. Were every one of them to be written, I suppose that the world itself could not contain the books that would be written. (John 21:25 ESV)
From among all Jesus did, there was a purpose for those selected:
30 Now Jesus did many other signs in the presence of the disciples, which are not written in this book; 31 but these are written so that you may believe that Jesus is the Christ, the Son of God, and that by believing you may have life in his name. (John 20)
The events John wrote about were included so the reader would believe Jesus is the Christ, the Son of God, and by believing have life in His name.
The Devil's Purpose in Temptation
The 40-days of temptation end with the devil challenging Jesus. For example:
9 And he took him to Jerusalem and set him on the pinnacle of the temple and said to him, “If you are the Son of God, throw yourself down from here, 10 for it is written, “‘He will command his angels concerning you,
to guard you,’ 11 and “‘On their hands they will bear you up,
lest you strike your foot against a stone.’” 12 And Jesus answered him, “It is said, ‘You shall not put the Lord your God to the test.’” 13 And when the devil had ended every temptation, he departed from him until an opportune time. (Luke 4)
The 40-days culminate with the devil challenging Jesus to do something which the devil claims will be evidence proving Jesus is the Son of God. Jesus responded to each challenge by citing a passage from the Old Testament:
“You shall not put the LORD your God to the test, as you tested him at Massah. (Deuteronomy 6:16)
Jesus always responded to each challenge by using something which happened during the Exodus. This is exactly how Paul taught the Old Testament should be used:
1 For I do not want you to be unaware, brothers, that our fathers were all under the cloud, and all passed through the sea, 2 and all were baptized into Moses in the cloud and in the sea, 3 and all ate the same spiritual food, 4 and all drank the same spiritual drink. For they drank from the spiritual Rock that followed them, and the Rock was Christ. 5 Nevertheless, with most of them God was not pleased, for they were overthrown in the wilderness.
6 Now these things took place as examples for us, that we might not desire evil as they did. 7 Do not be idolaters as some of them were; as it is written, “The people sat down to eat and drink and rose up to play.” 8 We must not indulge in sexual immorality as some of them did, and twenty-three thousand fell in a single day. 9 We must not put Christ to the test, as some of them did and were destroyed by serpents, 10 nor grumble, as some of them did and were destroyed by the Destroyer. 11 Now these things happened to them as an example, but they were written down for our instruction, on whom the end of the ages has come. 12 Therefore let anyone who thinks that he stands take heed lest he fall. 13 No temptation has overtaken you that is not common to man. God is faithful, and he will not let you be tempted beyond your ability, but with the temptation he will also provide the way of escape, that you may be able to endure it. (1 Corinthians 10)
With the Exodus in mind, the responses Jesus gave the devil could be summarized as "I am not going to prove I am the Son of God by making the same mistakes the Israelites did when they were tempted [by you] in the wilderness."
How Jesus responded to the temptations at the end of the 40-days are good examples for all believers. And, even though none of the Apostles were present and Paul does not make reference to the temptations, the accounts of Jesus life in Matthew and Luke contain examples Paul's instructions about using the Old Testament are how Jesus dealt with the devil.
The devil wanted Jesus to prove He was the Son of God by doing something which would have been a sin had He done them. Jesus correctly used events from the Exodus to avoid each temptation and so did not sin. Nevertheless, Jesus did not affirm His identity as the Son of God. These events are not in agreement with the purpose of John's Gospel.
John selected events which leave no doubt or question about who Jesus is, the Christ, the Son of God. Had Jesus proclaimed I am the Son of God, the temptations would have met the criteria.
Since Jesus did not proclaim who He was to the devil, not only do they not qualify, they are seemingly at odds with another way in which John's Gospel differs from the synoptic accounts. John provides 18 I am statements from and about Jesus. Including the 40-days of temptations would lessen the effect of I AM in John's account. After all, if Jesus is the Son of God, why didn't He say so when challenged by the devil?