When Jesus Christ was tempted by Satan, Satan asked him to do certain things which he denied. But in Matthew 8 the demons wanted Jesus to drive them into pigs and he did so. The herd then ran into the water and drowned. Why did Christ deny one request of the enemy but accept another?
In Matthew 8 we read:
The demons in this account occupied the bodies of human beings. The demons made the men extremely violent, so that no one could pass by the tombs. As Jesus approaches the scene, the demons suppose their judgment day has come. Notice that they recognize Jesus is God and their eternal Judge. Secondly, the demons understand that a time of punishment (torment) lies in their future. Thirdly, they seem to know the general timing of their judgment, since they declare Jesus is ahead of schedule.
In reality, Jesus did not come to judge them at that time (see John 3:17), so these demons were not in jeopardy of premature punishment. Nevertheless, they didn’t wait for Jesus to answer their question. Instead, they moved directly to proposing an alternative to the judgment they supposed was coming. The demons proposed to leave the bodies of the men and enter swine instead. It appears they hoped Jesus would accept this “deal” instead of casting them into the abyss. We see this in Luke’s account of the same moment:
The demons begged Jesus to accept their proposal, which Jesus did. After receiving permission from Jesus, the demons leave the men and enter the herd of pigs. Upon entering the herd, the demons caused the herd to become crazed and so they ran off a cliff into the Sea of Galilee. Ironically, the demons' desire to avoid eternal punishment resulted in the demise of their earthly hosts.
Jesus had no reason not to accept their proposal, since it served His purposes. First, it resulted in freeing the men from the demons. Secondly, pigs were unclean animals under Jewish law, so they were a perfect symbol and a harmless destination for unclean spirits (i.e., demons). Thirdly, accepting their proposal didn’t change the demons' eternal fate on Judgment Day. Therefore, Jesus accepted their proposal, since the demons were essentially doing Jesus’ work for Him.
More importantly, Jesus was not sinning in accepting the demons’ proposal. On the other hand, Jesus’ confrontation with Satan in the wilderness was quite different. Satan made specific demands of Christ, which were intended by Satan to lead Jesus into disobedience, had Jesus complied.
Therefore, Jesus rebuked Satan with scripture and did not agree to Satan’s demands. This is the key difference between the two moments. The demon’s request in Matthew 8 did not lead Jesus to sin, while Satan’s demands of Jesus were intended to bring Jesus into sin.