Did God want Satan to tempt Jesus as a means of showing the spiritual realm that Jesus's love for and loyalty to God was undeniable? Matthew 4:1
"Then Jesus was led by the Spirit into the wilderness to be tempted by the devil."

I am wondering if God wanted Jesus to be tempted by Satan as a means of showing Satan and the demons, and also all the angels in Heaven, that Jesus was truly devoted to God and would always remain loyal to Him despite whatever temptations that Satan would throw at Jesus.

Did God want Satan to tempt Jesus as a means of showing the spiritual realm that Jesus's love for and loyalty to God was undeniable?
There are a lot of biblical insights we can draw from this encounter. 

Look for example at Johns description of the worlds temptations


  
    For all that is in the world—the lust of the flesh, the lust of the eyes, and the pride of life—is not of the Father but is of the world.  1 John 2:16 NKJV
  


Jesus experiences these three in his encounter with Satan. 

The lust of the flesh: He hungers for bread, his body wants it, its natural human desire.

Lust of the eyes: He is taken to the mountain tops and shown all the kingdoms that he could want.

Pride of Life: He was tempted to jump off of the temple (In plain sight of the worshippers). To show in a dramatic way his glory, and earn the praise of the crowds. (as opposed to the path God put before him of suffering and shame leading to the cross).

This is also a pattern for believers in how to resist sin, notice that in each temptation Jesus responds with the Word of God, citing the Bible to refute the temptations of Satan. 


  
    Then Jesus said to him, “Away with you, Satan! For it is written, ‘You shall worship the Lord your God, and Him only you shall serve.’ ” Matt 4:10
  


Jesus is the example for the believers, modeling what James says


  
    Therefore submit to God. Resist the devil and he will flee from you. James 4:7
  


Also, This shows us that Jesus is familiar with the types of struggles which we encounter daily! He is familiar with temptations, and lived a life that we can relate too. 


  
    Seeing then that we have a great High Priest who has passed through the heavens, Jesus the Son of God, let us hold fast our confession. 15 For we do not have a High Priest who cannot sympathize with our weaknesses, but was in all points tempted as we are, yet without sin. Hebrews 4:14-15
  


Finally, like you mention in the question, Jesus entire life was a witness to his love for the Father, especially in his temptation. Look what Jesus says about the Satan, and the Father in John


  
    30 I will no longer talk much with you, for the ruler of this world is coming, and he has nothing in Me. 31 But that the world may know that I love the Father, and as the Father gave Me commandment, so I do. Arise, let us go from here. John 14:30-31
  


Jesus says that Satan has nothing in him, which was evidinced by his ability to withstand temptation. He also says, that his obedience to God is a witness of his Love for the father. 

This witness stands today, as a witness before not only the spiritual realm, but also the mortal realm. 

We see from Paul in Ephesians that one purpose of God in Jesus Christ was to reveal his plan to the world and the spiritual world


  
    To me, who am less than the least of all the saints, this grace was given, that I should preach among the Gentiles the unsearchable riches of Christ, 9 and to make all see what is the fellowship of the mystery, which from the beginning of the ages has been hidden in God who created all things through Jesus Christ; 10 to the intent that now the manifold wisdom of God might be made known by the church to the principalities and powers in the heavenly places, 11 according to the eternal purpose which He accomplished in Christ Jesus our Lord,